log compression
Posted Nov 20, 2011 19:47 UTC (Sun) by
quotemstr (subscriber, #45331)
In reply to:
log compression by slashdot
Parent article:
The Journal - a proposed syslog replacement
So build a separate auxiliary file that sits *alongside* conventional log files. This auxiliary file can contain all the journal metadata - PIDs, precise timestamps, message GUIDs - and index some of them. The conventional syslog file would happily exist alongside the auxiliary file, unless disable by an administrator.
Programs that want to log to the journal could use a library that look like this:
struct journal_log_attribute
{
enum journal_attribute_type type;
union {
journal_attribute_guid guid;
journal_attribute_keyval keyval;
journal_attribute_module module;
/* etc */
};
};
void
journal_vsyslog(
int priority,
const char* msg,
va_list args,
struct journal_log_attribute* attributes[] /* NULL-terminated */)
{
if (journald_is_active()) {
journal_internal_vsyslog(priority, msg, args, attributes);
}
vsyslog(priority, msg, args); /* Ignore attributes */
}
(
Log in to post comments)