有人成功了吗?我正在尝试在 Config.groovy 中制作一些东西,但它不起作用。这是我的代码:
log4j = {
appenders {
console name:'console',
layout:pattern(conversionPattern: '%d %-5p [%t] %c %x -%m%n')
appender new org.graylog2.log.GelfAppender(
name:'gelf',
graylogHost:'my_graylog_host',
graylogPort: graylog_port,
facility: 'myService',
extractStacktrace: true,
threshold: org.apache.log4j.Level.DEBUG
)
info additivity: false
}
}