You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/Logging.md
+40-36Lines changed: 40 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,97 +2,101 @@
2
2
3
3
### Log location
4
4
5
-
- Console: View -> Output, OUTPUT -> select list -> Rocket MV BASIC Language Server
6
-
Log information displays when the extension produces a warning level log by default.
5
+
- Console: From the Console, select "View" > "Output" and then from the OUTPUT panel, select "Rocket MV BASIC Language Server" from the Tasks drop-down.
6
+
7
+

8
+
9
+
**Note**: If there is no warning or above level logs generated, then there is no Console output.
- The Extension uses the log4j2 component to log. If you already know log4j2, it will be easy to configure the log. The following information includes commonly used options. These can be found here:https://logging.apache.org/log4j/2.x/manual/configuration.html:
17
+
- The Extension uses the **log4j2** component. If you already know log4j2, it will be easy to configure the log. You can find related settings in log4j2 official online documentation here:https://logging.apache.org/log4j/2.x/manual/configuration.html . The following are brief description of commonly used options for your reference.
15
18
16
19
#### property
17
20
18
-
The most commonly used configuration properties. In most cases, you will only need to change these properties:
21
+
In most cases, you will only need to change these properties:
19
22
20
-
- property.ROOT_LEVEL: Used to configure the "rootLogger.level". Logger levels include Trace,Debug, Info, Warn, Error, and Fatal. Only logs with levels higher than or equal to the configured level will be available. Root logger level is the first filter. Console or file level is the second filter, Only logs that meet both of these conditions will be printed. Reference value is "Info".
23
+
- property.ROOT_LEVEL: Used to configure the "rootLogger.level". Logger levels include Trace,Debug, Info, Warn, Error, and Fatal. Only logs with levels higher than or equal to the configured level will be available. Root logger level is the first filter. Console or file level is the second filter, only logs that meet both conditions will be printed. Recommended value is "Info".
21
24
22
-
- property.CONSOLE_LEVEL: Used to configure the "appender.console.filter.threshold.level". Limits the log level of output to the console. Reference value is "Warn".
25
+
- property.CONSOLE_LEVEL: Used to configure the "appender.console.filter.threshold.level". Limits the log level of output to the console. Recommended value is "Warn".
23
26
24
-
- property.FILE_LEVEL=trace: Used to configure the "appender.all.filter.threshold.level". Limits the log level of output to the file. Reference value is "Trace".
27
+
- property.FILE_LEVEL: Used to configure the "appender.all.filter.threshold.level". Limits the log level of output to the file. Recommended value is "trace".
25
28
26
-
- property.SERVER_NAME: Used to configure the log output file name. We recommend that this value not be changed. Reference value is "rocket_mv_basic_language_server".
29
+
- property.SERVER_NAME: Used to configure the log output file name. We recommend that this value not be changed. Recommended value is "rocket_mv_basic_language_server".
27
30
28
-
- property.LOG_HOME: Used to configure the log output file home path. Reference value is ".rmv/logs".
31
+
- property.LOG_HOME: Used to configure the log output file home path. Recommended value is ".rmv/logs".
29
32
30
33
#### global configuration
31
34
32
-
- status: The level of internal Log4j events that should be logged to the console. It hardly to help us , We recommend that this value not be changed. Reference value is "error".
33
-
- monitorInterval: The minimum amount of time, in seconds, before the file configuration is checked for changes. Reference value is "5".
35
+
- status: The level of internal Log4j events that should be logged to the console. We recommend that this value not be changed. Recommended value is "error".
36
+
37
+
- monitorInterval: The minimum amount of time, in seconds, before the file configuration is checked for changes. Recommended value is "5" seconds.
34
38
35
39
#### rootLogger
36
40
37
-
Set the level and zero or more appender refs to create for that logger.
41
+
Set the rootLogger level and where to place the log file. In addition, you can create appender refs for the logger.
38
42
39
-
- rootLogger.level: logger level. Reference value is "Info"
43
+
- rootLogger.level: logger level. Recommended value is "Info"
40
44
41
-
- rootLogger.appenderRef.console.ref: This value is identical to the value of appender.console.name. We recommend that this value not be changed. Reference value is "ConsoleAll".
45
+
- rootLogger.appenderRef.console.ref: This value is identical to the value of appender.console.name. We recommend that this value not be changed. Recommended value is "ConsoleAll".
42
46
43
-
- rootLogger.appenderRef.all.ref: This value is identical to the value of appender.file.name. We recommend that this value not be changed. Reference value is "RollingFileAll".
47
+
- rootLogger.appenderRef.all.ref: This value is identical to the value of appender.file.name. We recommend that this value not be changed. Recommended value is "RollingFileAll".
44
48
45
49
#### appender.console
46
50
47
-
Appender used to define output to the console
51
+
Appender used to define output to the console:
48
52
49
-
- appender.console.type: Fixed value. Reference value is "Console".
53
+
- appender.console.type: Suggest not to change. Recommended value is "Console".
50
54
51
-
- appender.console.name: We recommend that this value not be changed. Reference value is "ConsoleAll".
55
+
- appender.console.name: Suggest not to change. Recommended value is "ConsoleAll".
52
56
53
-
- appender.console.target: SYSTEM_OUT or SYSTEM_ERR. We recommend that you only use SYSTEM_ERR because SYSTEM_OUT will cause an extension run error! Reference value is "SYSTEM_ERR".
57
+
- appender.console.target: SYSTEM_OUT or SYSTEM_ERR, please only use SYSTEM_ERR here. Because SYSTEM_OUT may cause unexpected error.
54
58
55
-
- appender.console.layout.type: Includes "JSONLayout", "HTMLLayout", "YMLLayout" and so on. Recommended value is PatternLayout. Reference value is "PatternLayout".
59
+
- appender.console.layout.type: Includes "JSONLayout", "HTMLLayout", "YMLLayout" and so on. Recommended value is PatternLayout. Recommended value is "PatternLayout".
56
60
57
-
- appender.console.layout.pattern: output format. Reference value is "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
61
+
- appender.console.layout.pattern: output format. Recommended value is "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
58
62
59
-
- appender.console.filter.threshold.level: Refer to "property.CONSOLE_LEVEL". Fixed value, "${CONSOLE_LEVEL}".
63
+
- appender.console.filter.threshold.level: Refer to "property.CONSOLE_LEVEL". Suggest not to change, "${CONSOLE_LEVEL}".
60
64
61
-
- appender.console.filter.threshold.type: Includes "StringMatchFilter", "LevelRangFilter","RegexFilter" and so on. Reference value is "ThresholdFilter", output log infomation when log level >= CONSOLE_LEVEL
65
+
- appender.console.filter.threshold.type: Includes "StringMatchFilter", "LevelRangFilter","RegexFilter" and so on. Recommended value is "ThresholdFilter", output log information when log level >= CONSOLE_LEVEL
62
66
63
67
#### appender.file
64
68
65
69
Appender used to define output to the file
66
70
67
-
- appender.file.type: Fixed value. Reference value is "RollingFile".
71
+
- appender.file.type: Suggest not to change. Recommended value is "RollingFile".
68
72
69
-
- appender.file.name: We recommend that this value not be changed. Reference value is "RollingFileAll".
73
+
- appender.file.name: Suggest not to change. Recommended value is "RollingFileAll".
70
74
71
75
- appender.file.filter.threshold.level: Refer to "property.FILE_LEVEL". Fixed value, "${FILE_LEVEL}".
72
76
73
-
- appender.file.filter.threshold.type=ThresholdFilter: Refer to "appender.console.filter.threshold.type".
77
+
- appender.file.filter.threshold.type: Refer to "appender.console.filter.threshold.type".
74
78
75
-
- appender.file.fileName: Log file absolute path. Reference value is "${LOG_HOME}/${SERVER_NAME}.log"
79
+
- appender.file.fileName: Log file absolute path. Recommended value is "${LOG_HOME}/${SERVER_NAME}.log"
76
80
77
-
- appender.file.filePattern: file name format. Don't delete "%i" because it is related to "DefaultRolloverStrategy" (unless modify "DefaultRolloverStrategy" to another strategy). Reference value is "${LOG_HOME}/backup/${SERVER_NAME}.%d{yyyy-MM-dd}-%i.log".
81
+
- appender.file.filePattern: file name format. Don't delete "%i" because it is related to "DefaultRolloverStrategy" (unless modify "DefaultRolloverStrategy" to another strategy). Recommended value is "${LOG_HOME}/backup/${SERVER_NAME}.%d{yyyy-MM-dd}-%i.log".
78
82
79
83
- appender.file.layout.type: Refer to "appender.console.layout.type".
80
84
81
-
- appender.file.layout.pattern: output format. Reference value is "%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n".
85
+
- appender.file.layout.pattern: output format. Recommended value is "%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n".
82
86
83
87
- appender.file.policies.type: Specifies a strategy for scrolling logs. Fixed value, "Policies".
84
88
85
89
- appender.file.policies.time.type: Child of Policies with value fixed to "TimeBasedTriggeringPolicy". Time-based rolling strategy.
86
90
87
-
- appender.file.policies.time.interval: The interval property specifies how often it is flipped based on the most specific time unit in the date pattern. The month, day, hour, and minute depends on the date format configured in filePattern. Reference value is "1".
91
+
- appender.file.policies.time.interval: Recommended value is "1".
88
92
89
-
- appender.file.policies.time.modulate: Indicates whether to adjust the time interval so that the next rollover occurs at the interval boundary. Reference value is "true".
93
+
- appender.file.policies.time.modulate: Indicates whether to adjust the time interval so that the next rollover occurs at the interval boundary. Recommended value is "true".
90
94
91
95
- appender.file.policies.size.type: Child of Policies with a fixed value of "SizeBasedTriggeringPolicy". The scroll policy based on file size.
92
96
93
-
- appender.file.policies.size.size: Policies define the size of each log file. The size can be specified in bytes, suffixed with KB, MB or GB. Reference value is "10M".
97
+
- appender.file.policies.size.size: Policies define the size of each log file. The size can be specified in bytes, suffixed with KB, MB, or GB. Recommended value is "10M".
94
98
95
-
- appender.file.strategy.type: Fixed value, "DefaultRolloverStrategy". Used to specify the maximum number of log files that can exist in the same folder before the oldest log files are deleted allowing new log files to be created (via the max attribute). The default is to keep a maximum of seven files.
99
+
- appender.file.strategy.type: Suggest not to change, "DefaultRolloverStrategy". Used to specify the maximum number of log files that can exist in the same folder before the oldest log files are deleted allowing new log files to be created (via the max attribute). The default is to keep a maximum of seven files in backup file path.
96
100
97
101
### Examples
98
102
@@ -108,7 +112,7 @@ To set the log file level output to info level or higher., you only need to chan
108
112
109
113
**Example 2**
110
114
111
-
Set the console output information to debug level or higher and set the , log file output information to info level or higher:
115
+
Set the console output information to debug level or higher and set the log file output information to info level or higher:
0 commit comments