Using the Server Log File
The server log file records RADIUS events, such as server startup or shutdown or user authentication or rejection, as a series of messages in an ASCII text file. Each line of the server log file identifies the date and time of the RADIUS event, followed by event details. You can open the current log file while SBR Carrier is running.
Server log files are kept for the number of days specified in the Settings page (described in Configuring the Log Retention Period) and then deleted to conserve disk space.
You can roll the server log file over based on time (using the Rollover parameter), file size (using either the LogfileMaxMBytes or MaxSize parameter, or a combination of size and time.
When rolling over the file based on size, you can specify a maximum size for a server log file by entering a non-zero value for either the LogfileMaxMBytes (megabytes) or MaxSize (bytes) setting in the [Logging] section of the radius.ini file. If both LogFileMaxMBytes and MaxSize are present in this section, MaxSize is ignored and the log file size is based on LogFileMaxMBytes (MBytes). If you want to configure the maximum file size in bytes, do not include the LogFileMaxMBytes parameter in this section.
If a maximum file size is set, the server log filename identifies the date and time it was opened. Log files are named as follows:yyymmdd_xxxxx.log, where xxxxx is the sequence beginning with 00000. When the current server log file approaches the specified number, either megabytes (1024 x 1024 bytes) if using LogfileMaxMBytes, or bytes if using MaxSize, the current log file is closed and a new one is opened. The closed file is slightly smaller than the specified maximum file size.
If the maximum file size is set to 0 (or if the LogfileMaxMBytes setting is absent), the server log file size is ignored and log file names are date stamped to identify when they were opened (YYYYMMDD.log).
The size of the log file is checked once per minute. The log file may exceed the specified maximum file size temporarily (for less than a minute) after it passes the LogfileMaxMBytes threshold between size checks.
By default, server log files are located in the RADIUS database directory. You can specify an alternate destination directory in the [Configuration] section of the radius.ini file.
If you specify an alternate destination directory other than the default, ensure that the directory exists before starting the SBR. Otherwise, SBR may fail to function correctly.
Level of Logging Detail
Level of Logging Detail
You can control the level of detail recorded in server log files by use of the LogLevel, LogGroup, LogAccept, and LogReject settings.
The LogGroup parameter specifies the type of server functionality for which you want to log details in the server log file. LogGroup can be the numbers from 0 through 4, where 0—All, 1—Administration, 2—SessionControlSuccess and SessionControlFailure, 3—Diameter Peer State, and 4—Others. You can specify more than one number in this parameter; the numbers must be comma separated. For more detailed information about the LogGroup parameter, see SBR Carrier Reference Guide.
The LogLevel setting determines the level of detail to be captured in the server log file for the configured log groups. You configure a log level setting for all enabled log groups. The LogLevel can be the number 0, 1, or 2, where 0 is the least amount of information, 1 is intermediate, and 2 is the most verbose. The LogLevel setting is specified in the [Logging] section of radius.ini and in the [Settings] sections of .aut files.
For example, if you set the LogLevel parameter to 2 and the LogGroup parameter to 2:
LogLevel = 2
LogGroup = 2
Then, the entries to the server log file contain only debugging messages for session success and failure scenarios.
Configuration logs are always included in the server log file.
The LogAccept and LogReject flags allow you to turn on or off the logging of Access-Accept and Access-Reject messages in the server log file. These flags are set in the [Logging] section of radius.ini: a value of 1 causes these messages to be logged, and a value of 0 causes the messages to be omitted. An Accept or Reject is logged only if LogAccept or LogReject, respectively, is enabled and the LogLevel is verbose enough for the message to be recorded.
The TraceLevel setting specifies whether packets should be logged when they are received and being processed, and what level of detail should be recorded in the log. The TraceLevel can be the number 0, 1, or 2.
If you alter the LogLevel or TraceLevel settings, you can have them take effect without restarting the server by issuing the ./sbrd hup command.