Niko-O commented on issue #3433:
URL: 
https://github.com/apache/logging-log4j2/issues/3433#issuecomment-2724504351

   > 1. Why isn't your first thought to recommend changing this to
   
   Short answer: Because it's not the same thing.
   Longer answer: I have a few situations where I need to log quite a lot of 
stuff. Reading through all of that in a single line is painful. It's much 
easier to read if it's split into multiple lines. "This thing failed. Log this 
data. Log that data. Log the exception. Continue." is so much less mental 
burden than "This thing failed. Log this data. Log that data. Log the 
exception, but oh, wait, I need to add a pointless empty string as an argument 
here or the stack trace won't actually show up. Continue."
   
   > 2. Assuming for some reason they didn't want the first 3 log lines what 
would you tell someone who just did
   > logger.error(ex);
   
   Assuming someone **only** wrote this:
   ```
   try
   {
       doThing();
   }
   catch (ThingFailedException ex)
   {
       logger.error(ex);
       throw new WhateverException(ex); // Maybe also this
   }
   ```
   Yes, it's kidna weird that they don't add any additional context, but I 
guess it works for them ¯\\_(ツ)_/¯. Maybe this is the only place that this 
specific exception is thrown/caught anyways. Maybe the exception message 
already contains all the additional context they need. I don't want to dictate 
how other people debug their own code, I primarily care about my own debugging 
experience.
   
   > `LOGGER.warn("You need new software engineers");`
   
   That's unreasonable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to