A logging profile allows you to define and configure logging specific to that particular application. This includes specifying the log levels, log handlers, and formatting for the logs generated by your application. In this article we will learn how to define a Logging Profile and the key differences with Standard Loggers.
JBoss Logging
WildFly provides an highly-configurable logging subsystem that can be used both by WildFly core and by applications. The logging subsystem is based on JBoss LogManager project which supports several logging frameworks that you can configure on the top of JBoss Logging.
To learn more about JBoss Logging we recommend the following articles:
Internal Logging
Configuring a Periodic Rotating File Handler
Configuring Handlers for single packages
Configuring Logging for a single application
How to read WildFly log files using the CLI
5 WildFly Loggers you should know about
Log4j Configuration
How to fix Log4j CVE-2021-44228
Configuring Log4j1 in your applications
Configuring Log4j2 in your applications
Configure Log4j in an EAR file
How to use Log4j2 in your WildFly applications
Log4j2 is the latest major release of the popular Logging Framework. In this tutorial we will learn how to include Log4j2 configuration file and use it in your deployments running on WildFly.
Solving “SLF4J: Failed to load class ‘org.slf4j.impl.StaticLoggerBinder'” Error
The error message “SLF4J: Failed to load class ‘org.slf4j.impl.StaticLoggerBinder‘” commonly occurs in Java applications when the Simple Logging Facade for Java (SLF4J) framework cannot find an appropriate implementation for the logging system. This error can be frustrating, but it’s relatively straightforward to resolve by adding the necessary SLF4J dependencies to your project. In this tutorial, we’ll walk you through the steps to fix this error.
How to print logs in JSON format in WildFly
This article discusses the configuration you can apply in WildFly to enable logging in JSON format. We will learn how to do that natively in WildFly or using a Log4j custom configuration. Strategies for logging in JSON There are several use cases in which logging in JSON format can be useful. For example: Use cases … Read more
How to compress logs in WildFly
This article shows how to enable logs compression in WildFly by setting the appropriate suffix in your Periodic Rotating File Handler. In the second part of this tutorial we will learn how to compress logs using Log4j instead.
How to configure SLF4J in WildFly applications
In this tutorial, we will discuss how to use Simple Logging Facade for Java (SLF4J) with Wildfly application server. SLF4J is a logging facade that provides a unified interface for various logging frameworks, such as log4j, java.util.logging, and Logback. It allows for the decoupling of the application code from the underlying logging framework, making it easier to change the logging framework without modifying the application code.
Getting Started with Simple Logging Facade (SLF4J)
Simple Logging Facade for Java (SLF4J) is a logging facade that provides a unified interface for various logging frameworks, such as log4j, java.util.logging, and Logback. It allows for the decoupling of the application code from the underlying logging framework, making it easier to change the logging framework without modifying the application code. Here is a small tutorial to discuss the advantages of using SLF4J versus direct logging configuration.
How to read WildFly logs using the CLI
In this short tutorial we will learn how to inspect the WildFly log files from the Command Line Interface.
How to fix Log4j CVE-2021-44228
This security bulletin discusses the recent flaws in Log4j2 library which affects some recent versions of this opensource library. Let’s see how to perform checks and mitigation actions if your Java applications are using a flawed Log4j2 version.
Configuring a Periodic Rotating File Handler
This article will teach you how to configure the Periodic File Handler in WildFly. We will also go through some common settings and advanced options such as compressing and rotating the logs file.