I have a log4j config that rotates my logs daily. I want to be able to create a script that will compress and move yesterdays log files and move them to a mapped drive on windows.
相关问题
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
- xcopy include folder
- Django management command doesn't show logging
相关文章
- how do I log requests and responses for debugging
- Android Studio doesn't display logs by package
- Extracting columns from text file using Perl one-l
- Stacktrace does not print in Glassfish 4.1 Cluster
- Out of curiosity — why don't logging APIs impl
- Laravel log file based on date
- How can one batch file get the exit code of anothe
- Java -How to get logger to work in shutdown hook?
If your compression program has a CLI, you can easily create a batch script to do the following with your log file, or log files, or log directory containing the log file(s):
If you then create a Windows scheduled task to run this batch script daily or upon logging on, you should be set.
Important notes regarding the above steps in the batch script:
Concerning compression programs: WinZip, WinRAR, 7zip and IZArc offer command line interfaces, and even Microsoft's Win2k3 Resource Kit contains a Compress console utility…