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: Deployment
2spec:
3  template:
4    spec:
5      logging:
6        log4jLoggers:
7          "": INFO            # Root log level
8          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: Deployment
2spec:
3  template:
4    spec:
5      logging:
6        loggingProfile: default

In general, you should expect the Ververica Platform administrator to set up the default logging profile as required by your environment. Typically, the Deployment Defaults will provide a default value for the loggingProfile to use.

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 in case that the logging profile does not provide enough flexibility.

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