rmannibucau commented on PR #392:
URL: 
https://github.com/apache/maven-antrun-plugin/pull/392#issuecomment-6066679582

   @hankolerd there are plugins we do `try { 
Thread.currentThread().setName(....); doStuff(); } catch {} finally { 
Thread.currentThread().setName(originalName); }`, this would likely work for 
ant.
   
   1. it doesn't break loggers
   2. it gives you the info you want, you can even do threadName = "$original - 
ant xxxx"
   
   The pattern can be a bit more hacky for ant like doing the setname in the 
logger callback, capturing all threads (ie setName once) and resetting after 
the goal execution or alike to avoid to do it per log line (will be crazy in 
debug mode if done in the logger callback i guess even if it would work).
   
   Side note: long term patching Project with an executor service or thread 
factory instance at least (optional but used there) would be way saner IMHO.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to