CETAN Documentation
This documentation covers the CETAN Web Application Server, logging, TLS, authentication, IP filtering, Safe secrets, Safe utilities, development environment setup, and building C++ REST web services using the CETAN REST API.
Contents
Logging (SLog)
CETAN uses SLog as its primary logging utility. This section explains how to configure logging for the CETAN Web Application Server. For full details about SLog’s API and advanced features, refer to the official SLog documentation.
Configuration overview
- Define loggers, log levels, and appenders.
- Configure log file paths and rotation policies.
- Set the default log level for CETAN components.
Logging configuration files
The main logging configuration file is located at:
CETAN_SERVER/config/slog_config.xml
A complete reference configuration is also provided:
CETAN_SERVER/config/slog_config_full_sample.xml
CETAN reads this file at startup. Any changes require restarting the server.
CETAN’s built‑in logger
CETAN includes a private, reserved logger named CETAN. This logger is used
internally by the server and must not be redefined in your SLog configuration.
The default logger entry appears as:
<target name="cetan_file">
<type>file</type>
<file_name>cetan.log</file_name>
<max_number_file>10</max_number_file>
</target>
<logger name="CETAN">
<target>cetan_file</target>
<accept_level>INFO</accept_level>
</logger>
This logger accepts messages at INFO level or lower and outputs them to the console.
Because it is a private logger, do not create another logger with the same name.
Log levels
SLog supports the following log levels, from highest to lowest severity:
- OUT — always write to target.
- FATAL — fatal messages.
- ERROR — error messages.
- WARN — warnings and lower levels.
- AUDIT — request and client information.
- INFO — informational messages.
- TRACE — trace‑level diagnostic messages.
- DEBUG — full debug output (use only for troubleshooting).
For normal operation, set accept_level to ERROR or
WARN to reduce overhead.
Use AUDIT for basic request logging.
Use DEBUG only when diagnosing issues, as it significantly impacts performance.
Writing logs to a file
To write log output to a file, configure a file target and logger as follow:
<target name="restapi_file">
<type>file</type>
<file_name>restapi.log</file_name>
<max_number_file>10</max_number_file>
</target>
<logger name="RestAPI">
<target>restapi_file</target>
<accept_level>INFO</accept_level>
</logger>
Additional options such as file_size_max may be used to control rotation size.
Applying changes
After modifying slog_config.xml, restart the CETAN server for changes to take effect.
SLog is a flexible logging system. Refer to your SLog configuration file for full element definitions and advanced options.