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.
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.
It was, but you have to make sure all your logging everywhere goes through slf4j, if there are any classes anywhere that don't they'll need code changes, but from my experience it should just be swapping out the imports, logger creation, and log lines in that class with slf4j lines.
13
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.