Luiza  v03-01
loglevels.h
1 // -*- mode: c++;
2 
29 #ifndef loglevels_h
30 #define loglevels_h
31 
32 #include "streamlog/baselevels.h"
33 
35 namespace streamlog{
36 
37 
38  enum log_level_enum{
39  debug_base_level=0,
40  message_base_level=100,
41  warning_base_level=200,
42  error_base_level=300
43  } ;
44 
45  // DEFINE_STREAMLOG_LEVEL( classname, "LogString", loglevel , active_flag )
46 
47  DEFINE_STREAMLOG_LEVEL( DEBUG, "DEBUG", debug_base_level + 0 , STREAMLOG_DEBUG_ACTIVE )
48  DEFINE_STREAMLOG_LEVEL( DEBUG0, "DEBUG0", debug_base_level + 0 , STREAMLOG_DEBUG_ACTIVE )
49  DEFINE_STREAMLOG_LEVEL( DEBUG1, "DEBUG1", debug_base_level + 1 , STREAMLOG_DEBUG_ACTIVE )
50  DEFINE_STREAMLOG_LEVEL( DEBUG2, "DEBUG2", debug_base_level + 2 , STREAMLOG_DEBUG_ACTIVE )
51  DEFINE_STREAMLOG_LEVEL( DEBUG3, "DEBUG3", debug_base_level + 3 , STREAMLOG_DEBUG_ACTIVE )
52  DEFINE_STREAMLOG_LEVEL( DEBUG4, "DEBUG4", debug_base_level + 4 , STREAMLOG_DEBUG_ACTIVE )
53 
54  DEFINE_STREAMLOG_LEVEL( MESSAGE, "MESSAGE", message_base_level + 0 , STREAMLOG_MESSAGE_ACTIVE )
55  DEFINE_STREAMLOG_LEVEL( MESSAGE0, "MESSAGE0", message_base_level + 0 , STREAMLOG_MESSAGE_ACTIVE )
56  DEFINE_STREAMLOG_LEVEL( MESSAGE1, "MESSAGE1", message_base_level + 1 , STREAMLOG_MESSAGE_ACTIVE )
57  DEFINE_STREAMLOG_LEVEL( MESSAGE2, "MESSAGE2", message_base_level + 2 , STREAMLOG_MESSAGE_ACTIVE )
58  DEFINE_STREAMLOG_LEVEL( MESSAGE3, "MESSAGE3", message_base_level + 3 , STREAMLOG_MESSAGE_ACTIVE )
59  DEFINE_STREAMLOG_LEVEL( MESSAGE4, "MESSAGE4", message_base_level + 4 , STREAMLOG_MESSAGE_ACTIVE )
60 
61  DEFINE_STREAMLOG_LEVEL( WARNING, "WARNING", warning_base_level + 0 , STREAMLOG_WARNING_ACTIVE )
62  DEFINE_STREAMLOG_LEVEL( WARNING0, "WARNING0", warning_base_level + 0 , STREAMLOG_WARNING_ACTIVE )
63  DEFINE_STREAMLOG_LEVEL( WARNING1, "WARNING1", warning_base_level + 1 , STREAMLOG_WARNING_ACTIVE )
64  DEFINE_STREAMLOG_LEVEL( WARNING2, "WARNING2", warning_base_level + 2 , STREAMLOG_WARNING_ACTIVE )
65  DEFINE_STREAMLOG_LEVEL( WARNING3, "WARNING3", warning_base_level + 3 , STREAMLOG_WARNING_ACTIVE )
66  DEFINE_STREAMLOG_LEVEL( WARNING4, "WARNING4", warning_base_level + 4 , STREAMLOG_WARNING_ACTIVE )
67 
68  DEFINE_STREAMLOG_LEVEL( ERROR, "ERROR", error_base_level + 0 , STREAMLOG_ERROR_ACTIVE )
69  DEFINE_STREAMLOG_LEVEL( ERROR0, "ERROR0", error_base_level + 0 , STREAMLOG_ERROR_ACTIVE )
70  DEFINE_STREAMLOG_LEVEL( ERROR1, "ERROR1", error_base_level + 1 , STREAMLOG_ERROR_ACTIVE )
71  DEFINE_STREAMLOG_LEVEL( ERROR2, "ERROR2", error_base_level + 2 , STREAMLOG_ERROR_ACTIVE )
72  DEFINE_STREAMLOG_LEVEL( ERROR3, "ERROR3", error_base_level + 3 , STREAMLOG_ERROR_ACTIVE )
73  DEFINE_STREAMLOG_LEVEL( ERROR4, "ERROR4", error_base_level + 4 , STREAMLOG_ERROR_ACTIVE )
74 
75 
76  // use this to turn of all logging messages
77  DEFINE_STREAMLOG_LEVEL( SILENT, "SILENT" , STREAMLOG_MAX_LEVEL , false )
78 
79 }
80 
81 #endif
82 
83 
Namespace of method for logging messages based on streamlog.
Definition: baselevels.h:20