Menu Close
Settings Close

Language and Page Formatting Options

13.4.3. Configuring a Logging Profile using the CLI

A logging profile can be configured with log handlers, categories and a root logger using almost exactly the same syntax as when using the main logging subsystem.
There are only two differences between configuring the main logging subsystem and the logging profile:
  1. The root configuration path is /subsystem=logging/logging-profile=NAME
  2. A logging profile cannot contain other logging profiles.
Refer to the appropriate logging management task:

Example 13.58. Creating and Configuring a Logging Profile

Creating a logging profile and adding a category and file log handler.
  1. Create the profile:
  2. Create file handler
    /subsystem=logging/logging-profile=accounts-app-profile/file-handler=ejb-trace-file:add(file={path=>"ejb-trace.log", "relative-to"=>"jboss.server.log.dir"})
  3. Create logger category
  4. Assign file handler to category