7 /* Loglevels. Default is SCD_INFO */
8 typedef int scd_loglevel;
9 const scd_loglevel SCD_DEBUG = 0;
10 const scd_loglevel SCD_INFO = 1;
11 const scd_loglevel SCD_WARN = 2;
12 const scd_loglevel SCD_ERROR = 3;
15 * Log message if the current loglevel is low enough.
17 void scd_log(const scd_loglevel &level, const string &str);
20 * Log message with loglevel SCD_DEBUG.
22 inline void scd_debug(const string &str)
24 scd_log(SCD_DEBUG, str);
28 * Log message with loglevel SCD_INFO.
30 inline void scd_info(const string &str)
32 scd_log(SCD_INFO, str);
36 * Log message with loglevel SCD_WARN.
38 inline void scd_warn(const string &str)
40 scd_log(SCD_WARN, str);
44 * Log message with loglevel SCD_ERROR.
46 inline void scd_error(const string &str)
48 scd_log(SCD_ERROR, str);
52 * Set the current loglevel. Events with lower priorities are not logged.
54 void scd_set_loglevel(const scd_loglevel &level);