茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1671967 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
PIMG_00012.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2021/8/4 5:59:00

Logging properties file

The Dgraph HDFS Agent has a default Log4j configuration file that sets its logging properties.

The file is named log4j.properties and is located in the $DGRAPH_HOME/dgraph-hdfs-agent/lib directory.

The log file is a rolling log file. The default version of the file is as follows:
log4j.rootLogger=INFO, ROLLINGFILE
#
# Add ROLLINGFILE to rootLogger to get log file output
# Log DEBUG level and above messages to a log file
log4j.appender.ROLLINGFILE=oracle.core.ojdl.log4j.OracleAppender
log4j.appender.ROLLINGFILE.ComponentId=DgraphHDFSAgent
log4j.appender.ROLLINGFILE.Path=${logfilename}
log4j.appender.ROLLINGFILE.Format=ODL-Text
log4j.appender.ROLLINGFILE.MaxSegmentSize=10485760
log4j.appender.ROLLINGFILE.MaxSize=1048576000
log4j.appender.ROLLINGFILE.Encoding=UTF-8
log4j.appender.ROLLINGFILE.layout = org.apache.log4j.PatternLayout
log4j.appender.ROLLINGFILE.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n

The file defines the ROLLINGFILE appenders for the root logger and also sets the log level for the file.

The file has the following properties:

Logging propertyDescription
log4j.rootLogger The level of the root logger is defined as INFO and attaches the ROLLINGFILE appender to it.

You can change the log level, but do not change the ROLLINGFILE appender.

log4j.appender.ROLLINGFILE Sets the appender to be OracleAppender. This defines the ODL (Oracle Diagnostics Logging) format for the log entries.

Do not change this property.

log4j.appender.ROLLINGFILE.ComponentId Sets DgraphHDFSAgent
as the name of the component that generates the log messages.

Do not change this property.

log4j.appender.ROLLINGFILE.Path Sets the path for the log files. The ${logfilename} variable picks up the path from the Dgraph HDFS Agent --out flag used at start-up time.

Do not change this property.

log4j.appender.ROLLINGFILE.Format Sets ODL-Text as the formatted string as specified by the conversion pattern.

Do not change this property.

log4j.appender.ROLLINGFILE.MaxSegmentSize Sets the maximum size (in bytes) of the log file. When the dgraphHDFSAgent.out file reaches this size, a rollover file is created. The default is 10485760 (about 10 MB).
log4j.appender.ROLLINGFILE.MaxSizeSets the maximum amount of disk space to be used by the dgraphHDFSAgent.out file and the logging rollover files. The default is 1048576000 (about 1GB).
log4j.appender.ROLLINGFILE.Encoding Sets character encoding for the log file. The default UTF-8 value prints out UTF-8 characters in the file.
log4j.appender.ROLLINGFILE.layout Sets the org.apache.log4j.PatternLayout class for the layout.
log4j.appender.ROLLINGFILE.layout.ConversionPattern Defines the log entry conversion pattern.

For the conversion characters, see: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html

Logging levels


You can change the log level by opening the properties file in a text editor and changing the level for the log4j.rootLogger property to a Java log level from the table below. This example shows how you can change the log level setting to ERROR:
log4j.rootLogger=ERROR
When writing log messages, however, the logging system converts the Java level to an ODL equivalent level. The table below The log levels (in decreasing order of severity) are:


Java Log LevelODL Log LevelMeaning
OFF N/A Has the highest possible rank and is used to turn off logging.
FATAL INCIDENT_ERROR Indicates a serious problem that may be caused by a bug in the product and that should be reported to Oracle Support. In general, these messages describe events that are of considerable importance and which will prevent normal program execution.
ERROR ERROR Indicates a serious problem that requires immediate attention from the administrator and is not caused by a bug in the product.
WARN WARNING Indicates a potential problem that should be reviewed by the administrator.
INFO NOTIFICATION A message level for informational messages. This level typically indicates a major lifecycle event such as the activation or deactivation of a primary sub-component or feature. This is the default level.
DEBUG TRACE Debug information for events that are meaningful to administrators, such as public API entry or exit points.

These levels allow you to monitor events of interest at the appropriate granularity without being overwhelmed by messages that are not relevant. When you are initially setting up your application in a development environment, you might want to use the INFO level to get most of the messages, and change to a less verbose level in production.



原文出處:OracleDoc:Logging properties file
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|