W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
OrientDB使用與Java虛擬機綁定的Java日志記錄框架。 OrientDB的默認日志格式由OLogFormatter類管理。
<date> <level> <message> [<requester>]以下是上述語法中的選項的詳細信息。
# Specify the handlers to create in the root logger # (all loggers are children of the root logger) # The following creates two handlers handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler # Set the default logging level for the root logger .level = ALL # Set the default logging level for new ConsoleHandler instances java.util.logging.ConsoleHandler.level = INFO # Set the default formatter for new ConsoleHandler instances java.util.logging.ConsoleHandler.formatter = com.orientechnologies.common.log.OLogFormatter # Set the default logging level for new FileHandler instances java.util.logging.FileHandler.level = INFO # Naming style for the output file java.util.logging.FileHandler.pattern =../log/orient-server.log # Set the default formatter for new FileHandler instances java.util.logging.FileHandler.formatter = com.orientechnologies.common.log.OLogFormatter # Limiting size of output file in bytes: java.util.logging.FileHandler.limit = 10000000 # Number of output files to cycle through, by appending an # integer to the base file name: java.util.logging.FileHandler.count = 10
告訴那里的屬性文件被放置在JVM,您需要將“java.util.logging.config.file”系統(tǒng)屬性設置為它。例如,使用下面的命令 :
$ java -Djava.util.logging.config.file=mylog.properties ...設置日志記錄級別
<entry value = "fine" name = "log.console.level" /> <entry value = "fine" name = "log.file.level" />在Server.sh(或.bat)腳本中
$ java -Dlog.console.level = FINE ...在運行時記錄
public void main(String[] args){ System.setProperty("log.console.level", "FINE"); ... }在遠程服務器上
curl -u root:root -X POST http://localhost:2480/server/log.console/FINEST
啟用最好的跟蹤級別文件 :
curl -u root:root -X POST http://localhost:2480/server/log.file/FINEST
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: