215.5. Lumberjack 使用 Samples
215.5.1. 示例 1:流传输日志消息 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
RouteBuilder builder = new RouteBuilder() {
public void configure() {
from("lumberjack:0.0.0.0"). // Listen on all network interfaces using the default port
setBody(simple("${body[message]}")). // Select only the log message
to("stream:out"); // Write it into the output stream
}
};