Hacker News new | past | comments | ask | show | jobs | submit login

Are you still talking about logging?

Anyways, would love to hear more about your clever queries, even if it's OT.




Yep. The "style" of logger is in C, and looks (roughly) like this:

Logger* OpenLog(char*);

Table* MakeLog(Logger*, unsigned level, unsigned N, char* colNames, ColType *colTypes);

LOG(Table, Level, ...);

The branch to select log-level is trivial compared to the append cost. There's a few "backends" built in to the API: (1) a text-streaming version that just writes a text log; (2) a "bucketing" version that boils the calls to `MakeLog` down to accumulating buckets (with optional stack tracing); and, (3) journaling to a SQLite DB (with optional stack tracing).


Do you use glibc backtraces for stack tracing? I don't use C much, i guess that may be standard. or something else?

Also, can you describe the queries you run against this SQLite? Is it interactive use or do you have any jobs or charts that are powered by it?

So very interested in this whole approach - if you have any posts or links to read more happy to see em!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: