Docs Home
Viewing docs for
Self-ManagedNot available for BYOC

Logging

On this page

Apache Flink® clusters have a default Apache Log4j® configuration. It is possible to customize the generated logging configuration as described on this page.

Loggers

You can configure log levels for individual loggers via the log4jLoggers attribute:

YAML
1kind: SessionCluster
2spec:
3  logging:
4    log4jLoggers:
5      "": INFO            # Root log level
6      com.company: DEBUG  # Log level of com.company

Logging Profile

Logging profiles are Log4j configuration templates pre-configured by the Ververica Platform administrator. A profile named default is always available.

YAML
1kind: SessionCluster
2spec:
3  logging:
4    loggingProfile: default

In general, you should expect the Ververica Platform administrator to set up the default logging profile as required by your environment.

Please consult the Logging & Metrics documentation for more details on how to configure logging profiles.

Log4j Template (Advanced)

The Log4j configuration template gives you full control over the Apache Log4j® configuration of your Flink cluster if the logging profile does not provide enough flexibility.

YAML
1kind: SessionCluster
2spec:
3  logging:
4    log4j2ConfigurationTemplate: |
5      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
6      <Configuration xmlns="http://logging.apache.org/log4j/2.0/config" strict="true">
7      ...
8      </Configuration>

Custom Log4j templates follow the XML configuration format of Log4j and have higher precedence than a configured profile.

Please consult the Logging & Metrics documentation for more details on how to configure Log4j templates.

Was this helpful?