mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 13:15:35 +08:00
Improve Java logging (#8640)
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
ray.logging.level=info
|
||||
|
||||
ray.logging.stdout=org.apache.log4j.ConsoleAppender
|
||||
ray.logging.file=org.apache.log4j.varia.NullAppender
|
||||
|
||||
log4j.rootLogger=${ray.logging.level}, stdout, file
|
||||
|
||||
log4j.appender.stdout=${ray.logging.stdout}
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %p %c{1} [%t]: %m%n
|
||||
|
||||
# Set the file appender to null by default. If `ray.redirect-output` config is set to true,
|
||||
# this appender will be set to a real file appender.
|
||||
log4j.appender.file=${ray.logging.file}
|
||||
log4j.appender.file.File=${ray.logging.file.path}
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %p %c{1} [%t]: %m%n
|
||||
@@ -31,13 +31,20 @@ ray {
|
||||
resource-path: ""
|
||||
}
|
||||
|
||||
// Root dir of log files.
|
||||
// If this is not set, the default log-dir will be `${temp-dir}/session_xxx/logs`.
|
||||
log-dir: ""
|
||||
|
||||
// If true, output of worker processes will be redirected to log files.
|
||||
// Otherwise, output will be printed to console.
|
||||
redirect-output: true
|
||||
// Configurations about logging.
|
||||
logging {
|
||||
// Level of logging for Java workers.
|
||||
level: INFO
|
||||
// Pattern of log messages.
|
||||
pattern: "%d{yyyy-MM-dd HH:mm:ss,SSS} %p %c{1} [%t]: %m%n"
|
||||
// Root directory of the log files.
|
||||
// If this is not set, the default one will be `${temp-dir}/session_xxx/logs`.
|
||||
dir: ""
|
||||
// Maximum size that a log file is allowed to reach before being rolled over to backup files.
|
||||
max-file-size: 500MB
|
||||
// Maximum number of backup files to keep around.
|
||||
max-backup-files: 10
|
||||
}
|
||||
|
||||
// Custom worker jvm parameters.
|
||||
worker.jvm-parameters: []
|
||||
|
||||
Reference in New Issue
Block a user