Read about the efficient use of logging API in Quarkus, configuring logging output according to your needs, and using logging adapters to unify the output from other logging APIs.
Quarkus uses the JBoss Log Manager logging backend for publishing application and framework logs. Quarkus supports the JBoss Logging API as well as multiple other logging APIs listed in the upcoming section. These APIs seamlessly integrate with JBoss Log Manager.
To configure your logging, you will exclusively work within your application.properties
file.
Supported logging APIs
Applications and components commonly utilize a logging API to log messages during runtime. The underlying implementation of this API is responsible for storing these messages, typically in a file.
With all logs ultimately directed to the JBoss Log Manager, you have the flexibility to utilize any of the featured logging APIs available:
-
JDK
java.util.logging
(JUL)
By leveraging JBoss Logging within your application, you eliminate the need for additional logging dependencies. |
import org.jboss.logging.Logger;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
@Path("/hello")
public class ExampleResource {
private static final Logger LOG = Logger.getLogger(ExampleResource.class);
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
LOG.info("Hello");
return "hello";
}
}
While JBoss Logging routes log messages into JBoss Log Manager directly, one of your libraries might rely on a different logging API. In such cases, you need to use a logging adapter to ensure that its log messages are routed to JBoss Log Manager as well. |
Methods of obtaining an application logger
In Quarkus, the most common ways to obtain an application logger are by:
Declaring a logger field
With this classic approach, you use a specific API to obtain a logger instance, store it in a static field of a class, and call logging operations upon this instance.
The same flow can be applied with any of the supported logging APIs.
package com.example;
import org.jboss.logging.Logger;
public class MyService {
private static final Logger log = Logger.getLogger(MyService.class); (1)
public void doSomething() {
log.info("It works!"); (2)
}
}
1 | Define the logger field. |
2 | Invoke the desired logging methods on the log object. |
Logging with Panache
Quarkus simplifies logging by automatically adding logger fields to classes that use io.quarkus.logging.Log
.
This eliminates the need for repetitive boilerplate code and enhances logging setup convenience.
package com.example;
import io.quarkus.logging.Log; (1)
class MyService { (2)
public void doSomething() {
Log.info("Simple!"); (3)
}
}
1 | The io.quarkus.logging.Log class contains the same methods as JBoss Logging, except that they are static . |
2 | Note that the class does not declare a logger field.
This is because during application build, a private static final org.jboss.logging.Logger field is created automatically in each class that uses the Log API.
The fully qualified name of the class that calls the Log methods is used as a logger name.
In this example, the logger name would be com.example.MyService . |
3 | Finally, all calls to Log methods are rewritten to regular JBoss Logging calls on the logger field during the application build. |
Only use the Log API in application classes, not in external dependencies.
Log method calls that are not processed by Quarkus at build time will throw an exception.
|
Injecting a configured logger
The last alternative is to inject a configured org.jboss.logging.Logger
logger instance by using the @Inject
annotation.
This approach is applicable only for CDI beans.
You can use @Inject Logger log
, where the logger gets named after the class you inject it to, or @Inject @LoggerName("…") Logger log
, where the logger will receive the specified name.
Once injected, you can use the log
object to invoke logging methods.
import org.jboss.logging.Logger;
@ApplicationScoped
class SimpleBean {
@Inject
Logger log; (1)
@LoggerName("foo")
Logger fooLog; (2)
public void ping() {
log.info("Simple!");
fooLog.info("Goes to _foo_ logger!");
}
}
1 | The FQCN of the declaring class is used as a logger name, for example, org.jboss.logging.Logger.getLogger(SimpleBean.class) will be used. |
2 | In this case, the name foo is used as a logger name, for example,org.jboss.logging.Logger.getLogger("foo") will be used. |
The logger instances are cached internally. Therefore, when a logger is injected, for example, into a @RequestScoped bean, it is shared for all bean instances to avoid possible performance penalties associated with logger instantiation.
|
Logging levels
OFF |
A special level to use in configuration in order to turn off logging. |
FATAL |
A critical service failure or complete inability to service requests of any kind. |
ERROR |
A significant disruption in a request or the inability to service a request. |
WARN |
A non-critical service error or problem that may not require immediate correction. |
INFO |
Service lifecycle events or important related very low-frequency information. |
DEBUG |
Messages that convey extra information regarding lifecycle or non-request-bound events, useful for debugging. |
TRACE |
Messages that convey extra per-request debugging information that may be very high frequency. |
ALL |
A special level to use in configuration to turn on logging for all messages, including custom levels. |
You can also configure the following levels for applications and libraries that use java.util.logging
:
SEVERE |
Same as ERROR. |
WARNING |
Same as WARN. |
CONFIG |
Service configuration information. |
FINE |
Same as DEBUG. |
FINER |
Same as TRACE. |
FINEST |
Increased debug output compared to |
Numerical level value | Standard level name | Equivalent java.util.logging (JUL) level name |
---|---|---|
1100 |
FATAL |
Not applicable |
1000 |
ERROR |
SEVERE |
900 |
WARN |
WARNING |
800 |
INFO |
INFO |
700 |
Not applicable |
CONFIG |
500 |
DEBUG |
FINE |
400 |
TRACE |
FINER |
300 |
Not applicable |
FINEST |
Runtime configuration
Runtime logging is configured in the application.properties
file.
Because JBoss Logging is built-in to Quarkus, unified configuration is provided for all supported logging APIs.
INFO
logging and include Hibernate DEBUG
logs:quarkus.log.level=INFO
quarkus.log.category."org.hibernate".level=DEBUG
When you set the log level to below DEBUG
, you must also adjust the minimum log level.
This setting is either global, using the quarkus.log.min-level
configuration property, or per category:
quarkus.log.category."org.hibernate".min-level=TRACE
This sets a floor level for which Quarkus needs to generate supporting code. The minimum log level must be set at build time so that Quarkus can open the door to optimization opportunities where logging on unusable levels can be elided.
Setting INFO
as the minimum logging level sets lower-level checks, such as isTraceEnabled
, to false
.
This identifies code like if(logger.isDebug()) callMethod();
that will never be executed and mark it as "dead."
If you add these properties on the command line, ensure the `-Dquarkus.log.category.\"org.hibernate\".level=TRACE` |
All potential properties are listed in the logging configuration reference section.
Logging categories
Logging is done on a per-category basis, with each category being configured independently. A category configuration recursively applies to all subcategories of that category unless there is a more specific matching sub-category configuration.
The parent of all logging categories is called the "root category". This category, being the ultimate parent, may contain configuration which applies globally to all other categories. This includes the globally configured handlers and formatters.
Thus, configurations made under quarkus.log.console.
, quarkus.log.file.
, and quarkus.log.syslog.*
, are global and apply for all categories. For more information, see Logging configuration reference.
If you want to configure something extra for a specific category, create a named handler like quarkus.log.handler.[console|file|syslog].<your-handler-name>.*
and set it up for that category by using quarkus.log.category.<my-category>.handlers
.
An example use case can be a desire to use a different timestamp format for log messages which are saved to a file than the format used for other handlers.
For further demonstration, see the outputs of the Attaching named handlers to a category example.
Property Name | Default | Description |
---|---|---|
|
|
The level to use to configure the category named |
|
|
The minimum logging level to use to configure the category named |
|
|
Specify whether this logger should send its output to its parent logger. |
|
|
The names of the handlers that you want to attach to a specific category. |
The |
Root logger configuration
The root logger category is handled separately, and is configured by using the following properties:
Property Name | Default | Description |
---|---|---|
|
|
The default log level for every log category. |
|
|
The default minimum log level for every log category. |
-
The parent category is examined if no level configuration exists for a given logger category.
-
The root logger configuration is used if no specific configurations are provided for the category and any of its parent categories.
Although the root logger’s handlers are usually configured directly via |
Logging format
Quarkus uses a pattern-based logging formatter that generates human-readable text logs by default.
You can configure the format for each log handler by using a dedicated property.
For the console handler, the property is quarkus.log.console.format
.
The logging format string supports the following symbols:
Symbol | Summary | Description |
---|---|---|
|
|
Renders a simple |
|
Category |
Renders the category name. |
|
Source class |
Renders the source class name.[3] |
|
Date |
Renders a date with the given date format string, which uses the syntax defined by |
|
Exception |
Renders the thrown exception, if any. |
|
Source file |
Renders the source file name.[3] |
|
Host name |
Renders the system simple host name. |
|
Qualified host name |
Renders the system’s fully qualified host name, which may be the same as the simple host name, depending on OS configuration. |
|
Process ID |
Render the current process PID. |
|
Source location |
Renders the source location information, which includes source file name, line number, class name, and method name.[3] |
|
Source line |
Renders the source line number.[3] |
|
Full Message |
Renders the log message plus exception (if any). |
|
Source method |
Renders the source method name.[3] |
|
Newline |
Renders the platform-specific line separator string. |
|
Process name |
Render the name of the current process. |
|
Level |
Render the log level of the message. |
|
Relative time |
Render the time in milliseconds since the start of the application log. |
|
Simple message |
Renders just the log message, with no exception trace. |
|
Thread name |
Render the thread name. |
|
Thread ID |
Render the thread ID. |
|
Time zone |
Set the time zone of the output to |
|
Mapped Diagnostics Context Value |
Renders the value from Mapped Diagnostics Context |
|
Mapped Diagnostics Context Values |
Renders all the values from Mapped Diagnostics Context in format {property.key=property.value} |
|
Nested Diagnostics context values |
Renders all the values from Nested Diagnostics Context in format {value1.value2} |
Alternative console logging formats
The flexibility to change console log format is a useful feature you can use, for example, when the output of the Quarkus application is captured by a service that process and store the log information for later analysis.
JSON logging format
The quarkus-logging-json
extension may be employed to add support for the JSON logging format and its related configuration.
Add this extension to your build file as the following snippet illustrates:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-json</artifactId>
</dependency>
implementation("io.quarkus:quarkus-logging-json")
By default, the presence of this extension replaces the output format configuration from the console configuration, and the format string and the color settings (if any) are ignored. The other console configuration items, including those controlling asynchronous logging and the log level, will continue to be applied.
For some, it will make sense to use humanly readable (unstructured) logging in dev mode and JSON logging (structured) in production mode. This can be achieved using different profiles, as shown in the following configuration.
%dev.quarkus.log.console.json=false
%test.quarkus.log.console.json=false
Configuration
Configure the JSON logging extension using supported properties to customize its behavior.
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Type |
Default |
|
---|---|---|
Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting. Environment variable: |
boolean |
|
Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read pretty printed output. Environment variable: |
boolean |
|
The date format to use. The special string "default" indicates that the default format should be used. Environment variable: |
string |
|
The special end-of-record delimiter to be used. By default, newline is used as delimiter. Environment variable: |
string |
|
The zone ID to use. The special string "default" indicates that the default zone should be used. Environment variable: |
string |
|
The exception output type to specify. Environment variable: |
|
|
Enable printing of more details in the log. Printing the details can be expensive as the values are retrieved from the caller. The details include the source class name, source file name, source method name and source line number. Environment variable: |
boolean |
|
Override keys with custom values. Omitting this value indicates that no key overrides will be applied. Environment variable: |
string |
|
Keys to be excluded from the Json output. Environment variable: |
list of string |
|
Additional field value. Environment variable: |
string |
required |
Additional field type specification. Supported types: string, int, long String is the default if not specified. Environment variable: |
|
|
Type |
Default |
|
Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting. Environment variable: |
boolean |
|
Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read pretty printed output. Environment variable: |
boolean |
|
The date format to use. The special string "default" indicates that the default format should be used. Environment variable: |
string |
|
The special end-of-record delimiter to be used. By default, newline is used as delimiter. Environment variable: |
string |
|
The zone ID to use. The special string "default" indicates that the default zone should be used. Environment variable: |
string |
|
The exception output type to specify. Environment variable: |
|
|
Enable printing of more details in the log. Printing the details can be expensive as the values are retrieved from the caller. The details include the source class name, source file name, source method name and source line number. Environment variable: |
boolean |
|
Override keys with custom values. Omitting this value indicates that no key overrides will be applied. Environment variable: |
string |
|
Keys to be excluded from the Json output. Environment variable: |
list of string |
|
Additional field value. Environment variable: |
string |
required |
Additional field type specification. Supported types: string, int, long String is the default if not specified. Environment variable: |
|
|
Type |
Default |
|
Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting. Environment variable: |
boolean |
|
Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read pretty printed output. Environment variable: |
boolean |
|
The date format to use. The special string "default" indicates that the default format should be used. Environment variable: |
string |
|
The special end-of-record delimiter to be used. By default, newline is used as delimiter. Environment variable: |
string |
|
The zone ID to use. The special string "default" indicates that the default zone should be used. Environment variable: |
string |
|
The exception output type to specify. Environment variable: |
|
|
Enable printing of more details in the log. Printing the details can be expensive as the values are retrieved from the caller. The details include the source class name, source file name, source method name and source line number. Environment variable: |
boolean |
|
Override keys with custom values. Omitting this value indicates that no key overrides will be applied. Environment variable: |
string |
|
Keys to be excluded from the Json output. Environment variable: |
list of string |
|
Additional field value. Environment variable: |
string |
required |
Additional field type specification. Supported types: string, int, long String is the default if not specified. Environment variable: |
|
|
Enabling pretty printing might cause certain processors and JSON parsers to fail. |
Printing the details can be expensive as the values are retrieved from the caller. The details include the source class name, source file name, source method name, and source line number. |
Log handlers
A log handler is a logging component responsible for the emission of log events to a recipient. Quarkus includes several different log handlers: console, file, and syslog.
Console log handler
The console log handler is enabled by default, and it directs all log events to the application’s console, usually the system’s stdout
.
For details about its configuration, see the console logging configuration reference.
Logging filters
Log handlers, including the console log handler, can be associated with a filter that determines whether a log record should be logged or not.
To register a logging filter, annotate a (final
) class that implements java.util.logging.Filter
with @io.quarkus.logging.LoggingFilter
and set the name
property.
The filter is then attached to the appropriate handler using the filter
configuration property.
For instance, if you want to filter out log records containing specific text from the console logs, you can define the text as part of the application configuration instead of hardcoding it.
import io.quarkus.logging.LoggingFilter;
import java.util.logging.Filter;
import java.util.logging.LogRecord;
@LoggingFilter(name = "my-filter")
public final class TestFilter implements Filter {
private final String part;
public TestFilter(@ConfigProperty(name = "my-filter.part") String part) {
this.part = part;
}
@Override
public boolean isLoggable(LogRecord record) {
return !record.getMessage().contains(part);
}
}
application.properties
:my-filter.part=TEST
quarkus.log.console.filter=my-filter
File log handler
By default, the file log handler in Quarkus is disabled. Once enabled, it enables the logging of all events to a file on the application’s host, while also supporting log file rotation. Log file rotation ensures effective log file management over time by maintaining a specified number of backup log files, while keeping the primary log file up-to-date and manageable.
For details about its configuration, see the file logging configuration reference.
Syslog log handler
The syslog handler in Quarkus follows the Syslog protocol, which is used to send log messages on Unix-like systems. It utilizes the protocol defined in RFC 5424.
By default, the syslog handler is disabled. When enabled, it sends all log events to a syslog server, typically the local syslog server for the application.
For details about its configuration, see the Syslog logging configuration reference.
Logging configurations examples
This chapter provides examples of frequently used logging configurations.
quarkus.log.console.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
quarkus.log.console.level=DEBUG
quarkus.console.color=false
quarkus.log.category."io.quarkus".level=INFO
If you are adding these properties via command line make sure " is escaped.
For example -Dquarkus.log.category.\"io.quarkus\".level=DEBUG .
|
quarkus.log.file.enable=true
# Send output to a trace.log file under the /tmp directory
quarkus.log.file.path=/tmp/trace.log
quarkus.log.file.level=TRACE
quarkus.log.file.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
# Set 2 categories (io.quarkus.smallrye.jwt, io.undertow.request.security) to TRACE level
quarkus.log.min-level=TRACE
quarkus.log.category."io.quarkus.smallrye.jwt".level=TRACE
quarkus.log.category."io.undertow.request.security".level=TRACE
As we don’t change the root logger, console log will only contain INFO or higher order logs.
|
# Send output to a trace.log file under the /tmp directory
quarkus.log.file.path=/tmp/trace.log
quarkus.log.console.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
# Configure a named handler that logs to console
quarkus.log.handler.console."STRUCTURED_LOGGING".format=%e%n
# Configure a named handler that logs to file
quarkus.log.handler.file."STRUCTURED_LOGGING_FILE".enable=true
quarkus.log.handler.file."STRUCTURED_LOGGING_FILE".format=%e%n
# Configure the category and link the two named handlers to it
quarkus.log.category."io.quarkus.category".level=INFO
quarkus.log.category."io.quarkus.category".handlers=STRUCTURED_LOGGING,STRUCTURED_LOGGING_FILE
# configure a named file handler that sends the output to 'quarkus.log'
quarkus.log.handler.file.CONSOLE_MIRROR.enable=true
quarkus.log.handler.file.CONSOLE_MIRROR.path=quarkus.log
# attach the handler to the root logger
quarkus.log.handlers=CONSOLE_MIRROR
Centralized log management
To send logs to a centralized tool such as Graylog, Logstash, or Fluentd, see the Quarkus Centralized log management guide.
How to configure logging for @QuarkusTest
To configure logging for your @QuarkusTest
, ensure that you configure the maven-surefire-plugin
accordingly.
Specifically, you need to set the appropriate LogManager
by using the java.util.logging.manager
system property.
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> (1)
<quarkus.log.level>DEBUG</quarkus.log.level> (2)
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
1 | Make sure the org.jboss.logmanager.LogManager is used. |
2 | Enable debug logging for all logging categories. |
For Gradle, add the following configuration to the build.gradle
file:
test {
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
}
See also Running @QuarkusTest
from an IDE.
Logging adapters
Quarkus relies on the JBoss Logging library for all the logging requirements.
Suppose you use libraries that depend on other logging libraries, such as Apache Commons Logging, Log4j, or SLF4J. In that case, you need to exclude them from the dependencies and use one of the JBoss Logging adapters.
This is especially important when building native executables, as you could encounter issues similar to the following when compiling the native executable:
Caused by java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl
The logging implementation is not included in the native executable, but you can resolve this issue using JBoss Logging adapters.
These adapters are available for popular open-source logging components, as explained in the next chapter.
Add a logging adapter to your application
For each logging API that is not jboss-logging
:
-
Add a logging adapter library to ensure that messages logged through these APIs are routed to the JBoss Log Manager backend.
This step is unnecessary for libraries that are dependencies of a Quarkus extension where the extension handles it automatically. -
Apache Commons Logging:
pom.xml<dependency> <groupId>org.jboss.logging</groupId> <artifactId>commons-logging-jboss-logging</artifactId> </dependency>
build.gradleimplementation("org.jboss.logging:commons-logging-jboss-logging")
-
Log4j:
pom.xml<dependency> <groupId>org.jboss.logmanager</groupId> <artifactId>log4j-jboss-logmanager</artifactId> </dependency>
build.gradleimplementation("org.jboss.logmanager:log4j-jboss-logmanager")
-
Log4j 2:
pom.xml<dependency> <groupId>org.jboss.logmanager</groupId> <artifactId>log4j2-jboss-logmanager</artifactId> </dependency>
build.gradleimplementation("org.jboss.logmanager:log4j2-jboss-logmanager")
Do not include any Log4j dependencies because the
log4j2-jboss-logmanager
library contains all that is needed to use Log4j as a logging implementation. -
SLF4J:
pom.xml<dependency> <groupId>org.jboss.slf4j</groupId> <artifactId>slf4j-jboss-logmanager</artifactId> </dependency>
build.gradleimplementation("org.jboss.slf4j:slf4j-jboss-logmanager")
-
-
Verify whether the logs generated by the added library adhere to the same format as the other Quarkus logs.
Logging configuration reference
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Type |
Default |
|
---|---|---|
The log level of the root category, which is used as the default log level for all categories. JBoss Logging supports Apache style log levels:
In addition, it also supports the standard JDK log levels. Environment variable: |
|
|
The names of additional handlers to link to the root category. These handlers are defined in consoleHandlers, fileHandlers or syslogHandlers. Environment variable: |
list of string |
|
Type |
Default |
|
If console logging should be enabled Environment variable: |
boolean |
|
If console logging should go to Environment variable: |
boolean |
|
The log format. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
string |
|
The console log level. Environment variable: |
|
|
Specify how much the colors should be darkened. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
int |
|
The name of the filter to link to the console handler. Environment variable: |
string |
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
Type |
Default |
|
If file logging should be enabled Environment variable: |
boolean |
|
The log format Environment variable: |
string |
|
The level of logs to be written into the file. Environment variable: |
|
|
The name of the file in which logs will be written. Environment variable: |
|
|
The name of the filter to link to the file handler. Environment variable: |
string |
|
The character encoding used Environment variable: |
||
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
The maximum file size of the log file after which a rotation is executed. Environment variable: |
|
|
The maximum number of backups to keep. Environment variable: |
int |
|
File handler rotation file suffix. When used, the file will be rotated based on its suffix. Example fileSuffix: .yyyy-MM-dd Environment variable: |
string |
|
Indicates whether to rotate log files on server initialization. You need to either set a Environment variable: |
boolean |
|
Type |
Default |
|
If syslog logging should be enabled Environment variable: |
boolean |
|
The IP address and port of the syslog server Environment variable: |
host:port |
|
The app name used when formatting the message in RFC5424 format Environment variable: |
string |
|
The name of the host the messages are being sent from Environment variable: |
string |
|
Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164 Environment variable: |
|
|
Set the Environment variable: |
|
|
Sets the protocol used to connect to the syslog server Environment variable: |
|
|
Set to Environment variable: |
boolean |
|
Set to Environment variable: |
boolean |
|
Enables or disables blocking when attempting to reconnect a Environment variable: |
boolean |
|
The log message format Environment variable: |
string |
|
The log level specifying, which message levels will be logged by syslog logger Environment variable: |
|
|
The name of the filter to link to the file handler. Environment variable: |
string |
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
Type |
Default |
|
The log level for this category. Note that to get log levels below Environment variable: |
InheritableLevel |
|
The names of the handlers to link to this category. Environment variable: |
list of string |
|
Specify whether this logger should send its output to its parent Logger Environment variable: |
boolean |
|
Type |
Default |
|
If console logging should be enabled Environment variable: |
boolean |
|
If console logging should go to Environment variable: |
boolean |
|
The log format. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
string |
|
The console log level. Environment variable: |
|
|
Specify how much the colors should be darkened. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
int |
|
The name of the filter to link to the console handler. Environment variable: |
string |
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
Type |
Default |
|
If file logging should be enabled Environment variable: |
boolean |
|
The log format Environment variable: |
string |
|
The level of logs to be written into the file. Environment variable: |
|
|
The name of the file in which logs will be written. Environment variable: |
|
|
The name of the filter to link to the file handler. Environment variable: |
string |
|
The character encoding used Environment variable: |
||
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
The maximum file size of the log file after which a rotation is executed. Environment variable: |
|
|
The maximum number of backups to keep. Environment variable: |
int |
|
File handler rotation file suffix. When used, the file will be rotated based on its suffix. Example fileSuffix: .yyyy-MM-dd Environment variable: |
string |
|
Indicates whether to rotate log files on server initialization. You need to either set a Environment variable: |
boolean |
|
Type |
Default |
|
If syslog logging should be enabled Environment variable: |
boolean |
|
The IP address and port of the syslog server Environment variable: |
host:port |
|
The app name used when formatting the message in RFC5424 format Environment variable: |
string |
|
The name of the host the messages are being sent from Environment variable: |
string |
|
Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164 Environment variable: |
|
|
Set the Environment variable: |
|
|
Sets the protocol used to connect to the syslog server Environment variable: |
|
|
Set to Environment variable: |
boolean |
|
Set to Environment variable: |
boolean |
|
Enables or disables blocking when attempting to reconnect a Environment variable: |
boolean |
|
The log message format Environment variable: |
string |
|
The log level specifying, which message levels will be logged by syslog logger Environment variable: |
|
|
The name of the filter to link to the file handler. Environment variable: |
string |
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
Type |
Default |
|
The message starts to match Environment variable: |
list of string |
|
The new log level for the filtered message, defaults to DEBUG Environment variable: |
|
About the MemorySize format
A size configuration option recognises string in this format (shown as a regular expression): |