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 <raimo.vuonnala@nokia.com>

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


Generated on Tue Feb 24 16:21:35 2009 for libtime/clockd by  doxygen 1.5.1