#18 syslogging sm_marid_log calls

v0.2.12
closed-accepted
5
2006-07-28
2006-05-04
Steve McKenna
No

An enhancement that would be great for tracing plugin
activity, particularly dns lookups, would be to have
an option to syslog all sm_marid_log messages. For
example, adding something like this into sm_marid_log:

sm_marid_log(sm_marid *context, sm_marid_loglevel
level, const char *fmt, ...)
{
va_list va;
char buf[1024];

if (context == NULL || fmt == NULL)
return;

va_start(va, fmt);
vsnprintf(buf, sizeof buf, fmt, va);
va_end(va);

+ if ( sm_marid_logging )
+ {
+ syslog(LOG_DEBUG, "%s", buf );
+ }

(* context->sm_app_log)(context->sm_app_data, level,
buf);
}

Discussion

    • assigned_to: nobody --> sm-msk
     
  • Logged In: YES
    user_id=1048957

    Done for v0.2.14.

     
    • status: open --> closed-accepted
     
  • Logged In: YES
    user_id=1048957

    v0.2.14 released.