I created Java application (GUI) running on Windows that interacts over SSH with SQL DB configured on one Unix server, in my application i have several "print" messages as debug info to help analyzing program functionality in case of problems (ex. track user activity, track changes applied on the DB ...etc.), i need to create a log file to be stored on that Unix server to log all debug information and any encountered error message.
The log file should have following specs:
- Naming: log_(last time file was modified).log
- location: stored under /var/tmp
- Size: Maximum size is 10 MB after which new file is created, old file is renamed to .log.old
- file closed with app exit, same file re-opened with app start if size is still < 10 MB otherwise new file to be created/opened.
Any ideas? please help
Thanks in advance.