The SER Getting Started Log SystemThe Getting Started Log SystemExperience has shown that finding errors in a SERi configuration file can be tricky. Based on experience on supporting SER users on all levels on serusers and serdev, this log system has been developed to be of benefit to both beginners and experts (called 'Getting Started Log System' because it was in that effort it was created). The main idea is to create a coherent and simple way of logging in seri.cfg. For example, the Getting Started feature package uses this standardized logging so that people with problems can submit logs that can easily be read by anyone familiar with how Getting Started uses logging. Before you can understand the log system, you must understand logging in general in SER. Syslog (a Linux/Unix system service for central server logging) is used to log everything. Syslog uses so called "facilities" to categorize log messages and determine which files to log messages to. In addition, each message also has a level of importance, a priority (ex. DEBUG, INFO, NOTICE, etc), which each log line will normally show at the beginning of the line. The file /etc/syslog.conf controls to which files various facilities and priorities are logged. Default, SER logs to a standard facility that on most systems default ends up in /var/log/messages. The Getting Started feature package changes SER to log to the local0 facility (the facility to use is defined in common/local.m4). TIP! The priorities are important in SER, because when you log ser.cfg using the log or xlog commands, you specify the priority to use for that message. Dependent on the debug log level that you have defined in ser.cfg (or started SER with, -D -D etc), log lines in your ser.cfg will be actually logged or not (the ser.cfg debug level is defined by DEBUG_LEVEL in common/local.m4). The tricky thing is that increasing this global debug level also increases the amount of logging you get from SER itself. So, if you follow the priority system for your ser.cfg logging, you can end up with a LOT of log messages... The fix this, the log system we have built into this buildsystem is de-coupled from SER's internal log system, and this is what you need to know:
The flags to use are defined in common/local.m4, while the INCLUDE_* macros that define whether you include code for logging can be found in local/config.m4. Some comments on using the log system:
|
Navigation |