forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
LogConfig.java
113 lines (100 loc) · 3.12 KB
/
LogConfig.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package io.quarkus.runtime.logging;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.logging.Level;
import io.quarkus.runtime.annotations.ConfigDocSection;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
/**
*
*/
@ConfigRoot(phase = ConfigPhase.RUN_TIME)
public final class LogConfig {
/**
* 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:
*
* * {@link org.jboss.logmanager.Level#FATAL}
* * {@link org.jboss.logmanager.Level#ERROR}
* * {@link org.jboss.logmanager.Level#WARN}
* * {@link org.jboss.logmanager.Level#INFO}
* * {@link org.jboss.logmanager.Level#DEBUG}
* * {@link org.jboss.logmanager.Level#TRACE}
*
* In addition, it also supports the standard JDK log levels.
*
* @asciidoclet
*/
@ConfigItem(defaultValue = "INFO")
public Level level;
/**
* Console logging.
* <p>
* Console logging is enabled by default.
*/
@ConfigDocSection
public ConsoleConfig console;
/**
* File logging.
* <p>
* Logging to a file is also supported but not enabled by default.
*/
@ConfigDocSection
public FileConfig file;
/**
* Syslog logging.
* <p>
* Logging to a syslog is also supported but not enabled by default.
*/
@ConfigDocSection
public SyslogConfig syslog;
/**
* Logging categories.
* <p>
* Logging is done on a per-category basis. Each category can be independently configured.
* A configuration which applies to a category will also apply to all sub-categories of that category,
* unless there is a more specific matching sub-category configuration.
*/
@ConfigItem(name = "category")
@ConfigDocSection
public Map<String, CategoryConfig> categories;
/**
* Console handlers.
* <p>
* The named console handlers configured here can be linked on one or more categories.
*/
@ConfigItem(name = "handler.console")
@ConfigDocSection
public Map<String, ConsoleConfig> consoleHandlers;
/**
* File handlers.
* <p>
* The named file handlers configured here can be linked on one or more categories.
*/
@ConfigItem(name = "handler.file")
@ConfigDocSection
public Map<String, FileConfig> fileHandlers;
/**
* Syslog handlers.
* <p>
* The named syslog handlers configured here can be linked on one or more categories.
*/
@ConfigItem(name = "handler.syslog")
@ConfigDocSection
public Map<String, SyslogConfig> syslogHandlers;
/**
* Log cleanup filters - internal use.
*/
@ConfigItem(name = "filter")
@ConfigDocSection
public Map<String, CleanupFilterConfig> filters;
/**
* The names of additional handlers to link to the root category.
* These handlers are defined in consoleHandlers, fileHandlers or syslogHandlers.
*/
@ConfigItem
Optional<List<String>> handlers;
}