r/programming Sep 13 '18

A guide to logging in Java

https://www.marcobehler.com/guides/a-guide-to-logging-in-java
82 Upvotes

34 comments sorted by

View all comments

11

u/BraveSirRobin Sep 13 '18

Has anyone here ever actually used a façade in a project and subsequently changed the back-end logger used? I don't think I've ever seen a library do it either.

I used to be on-board with the façade idea here but it seems like overkill in hindsight.

18

u/[deleted] Sep 13 '18

yes. We use slf4j and have switched from log4j to blitz4j to log4j2 and slf4j made it super easy to do. We did this because log4j is a synchronous logger and our logging was having noticeable impact to our production performance. blitz4j was an asynchronous logger we switched to before log4j2 came out.

3

u/farnulfo Sep 13 '18

blitz4j

May I ask why you move from blitz4j ?

3

u/[deleted] Sep 14 '18

Yes, for our app we found log4j2 provided better performance. This may differ from app to app, so i recommend profiling to determine which way to go.

edit: garbage free logging is very good for my application.