11.8.3. 查看部署配置
您可以使用以下管理 CLI 命令获取有关特定部署的日志记录配置的信息。
/deployment=DEPLOYMENT_NAME/subsystem=logging/configuration=CONFIG:read-resource
部署的日志记录配置值 CONFIG
可以是以下三个值之一:
-
默认情况下
,如果部署使用logging
子系统 :这将输出logging
子系统配置。 -
profile-PROFILE_NAME
,如果部署使用logging
子系统中定义的日志记录配置文件。这将输出日志记录配置文件配置。 -
使用的配置文件的路径,例如
myear.ear/META-INF/logging.properties
。
例如,以下管理 CLI 命令显示 MYPROFILE
日志配置文件的配置,该配置集由指定部署使用。
/deployment=mydeployment.war/subsystem=logging/configuration=profile-MYPROFILE:read-resource(recursive=true,include-runtime=true)
这将输出以下信息:
{
"outcome" => "success",
"result" => {
"error-manager" => undefined,
"filter" => undefined,
"formatter" => {
"MYFORMATTER" => {
"class-name" => "org.jboss.logmanager.formatters.PatternFormatter",
"module" => undefined,
"properties" => {"pattern" => "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"}
}
},
"handler" => {
"MYPERIODIC" => {
"class-name" => "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler",
"encoding" => undefined,
"error-manager" => undefined,
"filter" => undefined,
"formatter" => "MYFORMATTER",
"handlers" => [],
"level" => "ALL",
"module" => undefined,
"properties" => {
"append" => "true",
"autoFlush" => "true",
"enabled" => "true",
"suffix" => ".yyyy-MM-dd",
"fileName" => "EAP_HOME/standalone/log/deployment.log"
}
}
},
"logger" => {"MYCATEGORY" => {
"filter" => undefined,
"handlers" => [],
"level" => "DEBUG",
"use-parent-handlers" => true
}},
"pojo" => undefined
}
}
您还可以使用递归 read-resource
操作来读取日志记录配置和有关部署的其他信息。
/deployment=DEPLOYMENT_NAME/subsystem=logging:read-resource(include-runtime=true, recursive=true)