Navigation


Changeset 1407:d4a4ab5239c7 in freeDiameter for include


Ignore:
Timestamp:
Feb 18, 2020, 3:01:07 PM (4 years ago)
Author:
Luke Mewburn <luke@mewburn.net>
Branch:
default
Phase:
public
Message:

add log level FD_LOG_INFO

Add log level FD_LOG_INFO, below FD_LOG_NOTICE and above FD_LOG_DEBUG.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdproto.h

    r1393 r1407  
    271271#define FD_LOG_ANNOYING  0  /* very verbose loops and such "overkill" traces. Only active when the framework is compiled in DEBUG mode. */
    272272#define FD_LOG_DEBUG     1  /* Get a detailed sense of what is going on in the framework. Use this level for normal debug */
     273#define FD_LOG_INFO      2  /* Informational execution states */
    273274#define FD_LOG_NOTICE    3  /* Normal execution states worth noting */
    274275#define FD_LOG_ERROR     5  /* Recoverable or expected error conditions */
     
    330331#define LOG_D(format,args... ) \
    331332                LOG(FD_LOG_DEBUG, format, ##args)
     333
     334/* Report an info message */
     335#define LOG_I(format,args... ) \
     336                LOG(FD_LOG_INFO, format,##args)
    332337
    333338/* Report a normal message that is useful for normal admin monitoring */
     
    517522                if ((__l__ = TRACE_BOOL(oldlevel))) {                                   \
    518523                        if      (oldlevel <= NONE) { LOG_E(format,##args); }            \
    519                         else if (oldlevel <= INFO) { LOG_N(format,##args); }            \
     524                        else if (oldlevel <= INFO) { LOG_I(format,##args); }            \
    520525                        else if (__l__ == 2)       { LOG_N(format,##args); }            \
    521526                        else if (oldlevel <= FULL) { LOG_D(format,##args); }            \
     
    596601#ifdef STRIP_DEBUG_CODE
    597602#undef LOG_D
     603#undef LOG_I
    598604#undef LOG_N
    599605#undef LOG_E
     
    602608
    603609#define LOG_D(format,args... ) /* noop */
     610#define LOG_I(format,args...) fd_log(FD_LOG_INFO, format, ## args)
    604611#define LOG_N(format,args...) fd_log(FD_LOG_NOTICE, format, ## args)
    605612#define LOG_E(format,args...) fd_log(FD_LOG_ERROR, format, ## args)
Note: See TracChangeset for help on using the changeset viewer.