logging.h File Reference

clockd logging interface More...

#include <syslog.h>

Defines

#define DO_LOG(__level,...)


Detailed Description

Interface to syslog and console debug printing

Copyright (C) 2008 Nokia. All rights reserved.

Author:
Raimo Vuonnala <[email protected]>

Define Documentation

#define DO_LOG ( __level,
...   ) 

Value:

{                                       \
  if (__level == LOG_DEBUG && !clockd_debug_mode) ;             \
  else {                                                        \
    if (clockd_debug_mode) {                                    \
      printf(MESTR __VA_ARGS__); printf("\n"); fflush(stdout);  \
    }                                                           \
    syslog(__level, __VA_ARGS__);                               \
  }                                                             \
}
Macro to do all logging

Parameters:
__level Message level, one of the following:
  • LOG_CRIT - critical failure
  • LOG_ERR - error condition, possibly resulting in reduced functionality
  • LOG_WARNING - abnormal condition, possibly resulting in reduced functionality
  • LOG_NOTICE - normal, but significant, condition
  • LOG_INFO - informational message
  • LOG_DEBUG - debugging message (NO-OP if not in debug mode)
... Typically printf-style formatter and parameters

Referenced by decode_ctm(), dump_date(), handle_alarm(), log_tm(), mainloop_run(), mainloop_stop(), read_conf(), save_conf(), send_time_change_indication(), server_filter(), server_init(), server_quit(), server_set_autosync(), server_set_time(), server_set_time_format(), server_set_tz(), set_time(), set_tz(), sighnd_handler(), and sighnd_terminate().


Generated on Wed Sep 30 22:01:20 2009 for libtime/clockd by  doxygen 1.5.6