原文地址:https://docs.jboss.org/author/display/AS71/Logging+Configuration

Overview

The overall server logging configuration is represented by the logging subsystem. It consists of three notable parts: handler configurations, logger and the root logger declarations (aka log categories). Each logger does reference a handler (or set of handlers). Each handler declares the log format and output:

<subsystem xmlns="urn:jboss:domain:logging:1.0">
   <console-handler name="CONSOLE" autoflush="true">
       <level name="DEBUG"/>
       <formatter>
           <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
       </formatter>
   </console-handler>
   <periodic-rotating-file-handler name="FILE" autoflush="true">
       <formatter>
           <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
       </formatter>
       <file relative-to="jboss.server.log.dir" path="server.log"/>
       <suffix value=".yyyy-MM-dd"/>
   </periodic-rotating-file-handler>
   <logger category="com.arjuna">
       <level name="WARN"/>
   </logger>
   [...]
   <root-logger>
       <level name="DEBUG"/>
       <handlers>
           <handler name="CONSOLE"/>
           <handler name="FILE"/>
       </handlers>
   </root-logger>
</subsystem>

Why is there a logging.properties file?

You may have noticed that there is a logging.properties file in the configuration directory. This logging configuration is used when the server boots up until the logging subsystem kicks in. If the logging subsystem is not included in your configuration, then this would act as the logging configuration for the entire server.

In the future this file may go away or be automatically generated from the logging subsystem. For most users this file should not be modified.

Note: If the logging.properties is not available during start there will be no logging until the logging subsystems kicks in, this is also the case if the configuration is damaged, the server might exit without any further message.

Default Log File Locations

Managed Domain

In a managed domain two types of log files do exist: Controller and server logs. The controller components govern the domain as whole. It's their responsibility to start/stop server instances and execute managed operations throughout the domain. Server logs contain the logging information for a particular server instance. They are co-located with the host the server is running on.

For the sake of simplicity we look at the default setup for managed domain. In this case, both the domain controller components and the servers are located on the same host:

Process Log File
Host Controller ./domain/log/host-controller/boot.log
Process Controller ./domain/log/process-controller/boot.log 
"Server One" ./domain/servers/server-one/log/boot.log 
"Server One" ./domain/servers/server-one/log/server.log 
"Server Three" ./domain/servers/server-three/log/boot.log 
"Server Three" ./domain/servers/server-three/log/server.log 
The server logs as you know it from previous JBoss AS versions are located in the servers subdirectory: I.e. ./domain/servers/server-three/log/server.log

Standalone Server

The default log files for a standalone server can be found in the log subdirectory of the distribution:

Process Log File
Server ./standalone/log/boot.log
Server ./standalone/log/server.log

最新文章

  1. 使用F#开发ASP.NET Core应用程序
  2. 朴素贝叶斯算法下的情感分析——C#编程实现
  3. 进阶系列一【绝对干货】---SQL语句执行效率优化
  4. 初学matlab----函数用法(随学习更新中)
  5. MVC学习(四)几种分页的实现(3)
  6. Teehan &amp; Lax 发布 iOS 7 GUI PSD 模板,免费下载
  7. AppScan8.0简单扫描
  8. log4j2 使用说明
  9. SpannableStringBuilder 和 SpannableString
  10. http://www.swoole.com/
  11. C#与lua相互调用
  12. VB.NET版机房收费系统---外观层如何写
  13. JavaScript学习摘要
  14. Asp.net中时间格式化的几种方法
  15. angular 2+ 变化检测系列一(基础概念)
  16. 最完整苹果IOS个人开发账号升级方法-个人开发账号升级为公司开发者账号常见误区
  17. Hadoop与MPP是什么关系?有什么区别和联系?
  18. 基于UML的中职班主任工作管理系统的分析与设计--文献随笔(二)
  19. CloudStack+KVM环境搭建(步骤很详细,说明ClockStack是用来管理虚拟机的)
  20. report源码分析——report_handle和report_server和report_catcher

热门文章

  1. SNN--Second Name Node
  2. MVC架构学习
  3. 变更到Android4.4的问题
  4. bzoj 3626: [LNOI2014]LCA 离线+树链剖分
  5. ios7控件特性(一)
  6. Angular 2 npm start 报错
  7. ViewHolder VS HolderView ?
  8. MSbuild 教程
  9. vs2015
  10. 分布式文件系统MFS(moosefs)实现存储共享(一)