#include <string>#include <stdio.h>Go to the source code of this file.
Defines | |
| #define | y2log_suffix |
| #define | y2log_prefix "" |
| #define | y2_logger(level, comp, file, line, function, format, args...) |
| #define | y2_vlogger(level, comp, file, line, function, format, args) |
| #define | y2logger(level, format, args...) y2_logger(level,y2log_prefix,__FILE__,__LINE__,__FUNCTION__,format,##args) |
| #define | y2vlogger(level, format, ap) y2_vlogger(level,y2log_prefix,__FILE__,__LINE__,__FUNCTION__,format,ap) |
| #define | y2debug(format, args...) y2logger(LOG_DEBUG,format,##args) |
| #define | y2milestone(format, args...) y2logger(LOG_MILESTONE,format,##args) |
| #define | y2warning(format, args...) y2logger(LOG_WARNING,format,##args) |
| #define | y2error(format, args...) y2logger(LOG_ERROR,format,##args) |
| #define | y2security(format, args...) y2logger(LOG_SECURITY,format,##args) |
| #define | y2internal(format, args...) y2logger(LOG_INTERNAL,format,##args) |
| #define | y2lograw(message) y2_logger_raw(message) |
Enumerations | |
| enum | loglevel_t { LOG_DEBUG = 0, LOG_MILESTONE = 1, LOG_WARNING = 2, LOG_ERROR = 3, LOG_SECURITY = 4, LOG_INTERNAL = 5 } |
Functions | |
| void | y2_logger_function (loglevel_t level, const char *component, const char *file, const int line, const char *func, const char *format,...) __attribute__((format(printf |
| void void | y2_vlogger_function (loglevel_t level, const char *component, const char *file, const int line, const char *func, const char *format, va_list ap) |
| void | y2_logger_raw (const char *message) |
| bool | should_be_logged (int loglevel, string componentname) |
| void | set_log_filename (string filename) |
| string | get_log_filename () |
| void | set_log_conf (string confname) |
| void | set_log_simple_mode (bool simple) |
| void | set_log_debug (bool on=true) |
| bool | get_log_debug () |
| #define y2_logger | ( | level, | |||
| comp, | |||||
| file, | |||||
| line, | |||||
| function, | |||||
| format, | |||||
| args... | ) |
Value:
do { \ if (should_be_logged (level, comp)) \ y2_logger_function (level,comp,file,line,function,format,##args);\ } while (0)
| #define y2_vlogger | ( | level, | |||
| comp, | |||||
| file, | |||||
| line, | |||||
| function, | |||||
| format, | |||||
| args | ) |
Value:
do { \ if (should_be_logged (level, comp)) \ y2_vlogger_function (level,comp,file,line,function,format,args);\ } while (0)
| #define y2debug | ( | format, | |||
| args... | ) | y2logger(LOG_DEBUG,format,##args) |
| #define y2error | ( | format, | |||
| args... | ) | y2logger(LOG_ERROR,format,##args) |
| #define y2internal | ( | format, | |||
| args... | ) | y2logger(LOG_INTERNAL,format,##args) |
| #define y2log_prefix "" |
| #define y2log_suffix |
| #define y2logger | ( | level, | |||
| format, | |||||
| args... | ) | y2_logger(level,y2log_prefix,__FILE__,__LINE__,__FUNCTION__,format,##args) |
| #define y2lograw | ( | message | ) | y2_logger_raw(message) |
| #define y2milestone | ( | format, | |||
| args... | ) | y2logger(LOG_MILESTONE,format,##args) |
| #define y2security | ( | format, | |||
| args... | ) | y2logger(LOG_SECURITY,format,##args) |
| #define y2vlogger | ( | level, | |||
| format, | |||||
| ap | ) | y2_vlogger(level,y2log_prefix,__FILE__,__LINE__,__FUNCTION__,format,ap) |
| #define y2warning | ( | format, | |||
| args... | ) | y2logger(LOG_WARNING,format,##args) |
| enum loglevel_t |
| bool get_log_debug | ( | ) |
whether debug logging is enabled
| string get_log_filename | ( | ) |
| void set_log_conf | ( | string | confname | ) |
Read an alternate logconf file y2log. If this is not done by the application the first call to y2log sets the logconf file as follows: users: $HOME/.yast2/log.conf root: /etc/YaST2/log.conf
| void set_log_debug | ( | bool | on = true |
) |
enable or disable debug logging
| on | true for on |
| void set_log_filename | ( | string | filename | ) |
Set an alternate logfile name for y2log. If this is not done by the application the first call to y2log sets the logfile name as follows: users: $HOME/.y2log root: /var/log/YaST2/y2log
The logname "-" is special: The log messages are written to stderr.
| void set_log_simple_mode | ( | bool | simple | ) |
Set (or reset) the simple mode
| bool should_be_logged | ( | int | loglevel, | |
| string | componentname | |||
| ) |
| void y2_logger_function | ( | loglevel_t | level, | |
| const char * | component, | |||
| const char * | file, | |||
| const int | line, | |||
| const char * | func, | |||
| const char * | format, | |||
| ... | ||||
| ) |
| void y2_logger_raw | ( | const char * | message | ) |
| void void y2_vlogger_function | ( | loglevel_t | level, | |
| const char * | component, | |||
| const char * | file, | |||
| const int | line, | |||
| const char * | func, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
1.5.3