> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/cdf/4.2/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/cdf/4.2/configuration/logger.md).

# Logging configuration

Charging Data Function (CDF) uses the following log levels:
- `info` — general operational messages about the system's progress. Both Sender and Receiver log successful NATS stream creation operations.
- `warning` — unusual or unexpected situations that aren’t critical errors but might require attention.
- `error` — serious issues or failures that require immediate action.
- `emergency` — critical failure that makes it impossible for the system to continue working.

In addition, third-party libraries integrated with CDF may use other standard log levels as described in the [Elixir Logger documentation](https://hexdocs.pm/logger/main/Logger.html).
The document describes a runtime configuration required when something other than a log level must be configured.
For example, you need to change the configuration for logging overload.

Receiver only includes 'Session-Id', 'Accounting-Record-Type', and 'Accounting-Record-Number' in the log.
This allows the ACR to be identified in a PCAP file, but does not disclose too much information.

Sender only includes 'nodeID' and 'localSequenceNumber' in the log.
This allows the CDR to be identified in a work queue or an archive, but does not disclose too much information.

## info

Successful operations that happen rarely are logged at the `info` log level.
Activities that succeed frequently are not logged.
That would damage the systems ability to maintain maximum performance.

## warning

Events that might happen, but are not a good sign when CDF is working under normal conditions, are logged at the `warning` log level.
The `warning` level is supposed to be rare during normal operation, allowing the system to maintain maximum performance. If too many warnings appear, it signals a problem — in that case, the number of warnings itself should be treated as an error.

## error

Events that should not happen when CDF works under normal conditions are logged at the `error` log level.
The `error` level should not be seen during normal operation, allowing the system to maintain maximum performance.
When errors are logged, try to remove the source of the errors.

## emergency

Both Sender and Receiver log when it is impossible to start.
