Amoeba
Amoeba

Reputation: 631

Logback: Can you use AsyncAppender inside SiftingAppender?

Reading http://blog.takipi.com/how-to-instantly-improve-your-java-logging-with-7-logback-tweaks/ , it is suggested that FileAppender is very slow compared with AsyncAppender.

I currently have a SiftingAppender then uses FileAppender to write to file. If I change FileAppender with AsyncAppender->FileAppender will this give me a significant performance increase (assuming it is possible)?

Upvotes: 1

Views: 665

Answers (1)

Alexei Osipov
Alexei Osipov

Reputation: 762

No. You can't have multiple appenders inside SiftingAppender. See http://logback.qos.ch/codes.html#1andOnly1

However you can put AsyncAppender outside with almost same result. So your appender chain may look like this: ROOT -> AsyncAppender -> SiftingAppender -> FileAppender

Upvotes: 2

Related Questions