我想打印系统日志,因为它使用java和log4j进行打印。 但是,我没有办法使用log4js在量角器中编写系统日志。
log4js.configure({
appenders: [
{
type: "clustered",
appenders: [
{
type: "dateFile",
filename: "log/access.log",
pattern: "-yyyy-MM-dd",
category: "http"
},
{
type: "file",
filename: "log/app.log",
maxLogSize: 10485760,
numBackups: 3
},
{
type: "logLevelFilter",
level: "ERROR",
appender: {
type: "file",
filename: "log/errors.log"
}
}
]
}
]