jboss 7 as1 日志配置

原文地址: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
时间: 2024-09-30 22:41:37

jboss 7 as1 日志配置的相关文章

MyBatis应用开发(6)日志之日志配置

1. 日志 1.1. 日志配置 MyBatis的总体配置文件中可以通过setting配置所采用的日志输出途径,也可以配置为不输出日志. logImpl:配置MyBatis使用的日志实现方式.可以选的方式:SLF4J.LOG4J.LOG4J2.JDK_LOGGING.COMMONS_LOGGING.STDOUT_LOGGING.NO_LOGGING.也可以是实现了org.apache.ibatis.logging.Log接口的类的全限定名. <configuration> <!-- 配置参

CentOS 6.6 sudo日志配置

CentOS 6.6 sudo日志配置 查询syslog和sudo软件是否已安装 [[email protected] ~]# rpm-qa|egrep "sudo|syslog" rsyslog-5.8.10-8.el6.x86_64 sudo-1.8.6p3-15.el6.x86_64 配置/etc/sudoers文件 [[email protected] ~]# echo"Defaults    logfile=/var/log/sudo.log">&g

Tomcat日志配置

1.Log4j日志配置 ①log4j代替tomcat自身的log 如果想用log4j来详细的打印出 tomcat的log,用下面的方法可以做到首先,将common-logging和log4j的包放入tomat/common/lib下然后将log4j.properties文件放入tomcat/common/classes下 ②根据日志不同级别,进行配置输出 配置文件: ### set log levels ###log4j.rootLogger = debug ,  stdout ,  D , 

[译]Stairway to Integration Services Level 12 - 高级日志配置

介绍 本文中,我们将结合之前学习的时间冒泡,日志记录,以及复制模型.建立一个自定义的SSIS包日志模型. SSIS Task事件回顾    Reviewing SSIS Task Events 在做实验之前我们更改一下 Precedence.dtsx SSIS 包的设置. 把 Precedence.dtsx SSIS 包的 DisableEventHandlers 属性改为True Figure 2 屏蔽内置日志   Disable Built-In Logging 首先我们要移除已经存在的日志

django 1.8 日志配置

以下为setings配置logging代码片段 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) LOGDIR = os.path.join(BASE_DIR, "logs") LOGFILE = datetime.datetime.now().strftime("%Y-%m-%d") + ".log" if not os.path.exists(LOGD

tomcat生成调试日志配置

创建文件logging.properties 文件存放于应用WEB-INF/classes下 文件内容如下: 1 handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 2   3 ############################################################ 4 # Handler specific properties. 5 # Describes specif

tomcat 6.x + log4j日志配置并按天(或大小)生成文件

tomcat日志,默认路径在${catalina.home}/logs目录下,默认使用的是tomcat自己封装的logging工具类,默认配置文件使用的${catalina.home}/conf/logging.properties 默认的配置不满足按天或按大小将日志区分,用以备份或转移或删除,经常会出现日志文件超大,磁盘空间不够的情况(就算磁盘够,一段时间后的日志也应该及时清理和压缩起来). 考虑到这种需求,使用log4j的配置,将tomcat的logging拦截起来,配置如下: 采用log4

九爷带你了解 nginx 日志配置指令详解

nginx日志配置指令详解 日志对于统计排错来说非常有利的. 本文总结了nginx日志相关的配置如 access_log.log_format.open_log_file_cache.log_not_found.log_subrequest.rewrite_log.error_log. nginx有一个非常灵活的日志记录模式.每个级别的配置可以有各自独立的访问日志.日志格式通过log_format命令来定义.ngx_http_log_module是用来定义请求日志格式的. 1. access_l

手把手教你完成MaxCompute JDBC自定义日志配置

注:MaxCompute原名ODPS,是阿里云自研的大数据计算平台,文中出现的MaxCompute与ODPS都指代同一平台,不做区分 与MaxCompute JDBC相关的日志有两种,一种是由JDBC内部代码直接输出的日志,第二种是JDBC抛出异常后,由调用JDBC API的宿主应用捕获后输出的.由于第二类日志取决于宿主应用如何处理异常及如何配置日志体系,所以本文主要讨论的对象是第一种日志. 在2.0-beta之前,MaxCompute JDBC的日志只会输出到命令行终端(标准输出流),它底层使