简体   繁体   English

cloudstack中的log4j配置文件类型

[英]log4j configuration file types in cloudstack

I am studying the logging structure used with CloudStack. 我正在研究与CloudStack一起使用的日志记录结构。 I understand that it uses log4j to do the logging. 我了解它使用log4j进行日志记录。 log4j requires the use of configuration files to control what to log and where to log it. log4j要求使用配置文件来控制记录内容和记录位置。 What I found is that the there was a combination of several log configuration files accross the log4j project along with the properties files that can be used to perform the tasks of a configuration file. 我发现,log4j项目中包含多个日志配置文件以及可用于执行配置文件任务的属性文件的组合。 What I want to understand is as follow: 我想了解的如下:

1- CloudStack contains two types of configuration files which are "log4j-cloud.xml" and "log4j-cloud.xml.in". 1- CloudStack包含两种类型的配置文件:“ log4j-cloud.xml”和“ log4j-cloud.xml.in”。 these two types of files are spread accross different projects and dosent contain the same information. 这两种类型的文件分布在不同的项目中,并且剂量包含相同的信息。 What is the difference between these files, and what the "in" stand for. 这些文件之间有什么区别,“ in”代表什么。

2- What is being used by log4j to specify what to log and where to log it. 2- log4j使用什么来指定要记录什么以及在哪里记录。 Is it the cofiguration file or the properties file. 是配置文件还是属性文件。

  1. The log4j-cloud.xml.in is the configuration file for console logging. log4j-cloud.xml.in是用于控制台日志记录的配置文件。 This is where you should be setting your configuration 这是您应该设置配置的地方

  2. log4j is used for cloudstack exception logging and the log4j.xml file is where you would configure that. log4j用于云堆栈异常日志记录,而log4j.xml文件是在其中进行配置的位置。 You can find more information about cloudstack exception logging using log4j here https://cwiki.apache.org/confluence/display/CLOUDSTACK/Exceptions+and+logging 您可以在此处https://cwiki.apache.org/confluence/display/CLOUDSTACK/Exceptions+and+logging中找到使用log4j的有关cloudstack异常日志记录的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM