Hello everyone

 

I have a multi-threaded Java 7 program (a jar file) which uses JDBC to perform work (it uses a fixed thread pool).

The program works fine and it logs things as it progresses to the command shell console window (System.out.printf()) from multiple concurrent threads.

In addition to the console output I also need to add the ability for this program to write to a single plain ASCII text log file - from multiple threads.

The volume of output is low, the file will be relatively small as its a log file, not a data file.

Can you please suggest a good and relatively simple design/approach to get this done using Java 7 features (I dont have Java 8 yet)?

Any code samples would also be appreciated.

 

thank you very much

FacebookTwitterLinkedin
Pin It
Joomla Tutorials for Beginners