[SOLVED] Rotating log file

Any questions? Need some help?
Post Reply
Hollow
Posts: 4
Joined: 09 Nov 2013, 11:33

[SOLVED] Rotating log file

Post by Hollow »

Hi

I get how I use --log and --log-file, but is there any way I can set up log rotation within these parameters?
I would like to have amc_[ddMMYYYY].log, rotating each day. f.ex.

Thanks! :)
Last edited by Hollow on 09 Nov 2013, 16:45, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 23928
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rotating log file

Post by rednoah »

Just have a script call filebot with --log-file argument for today. You only need basic bash scripting for that.
:idea: Please read the FAQ and How to Request Help.
Hollow
Posts: 4
Joined: 09 Nov 2013, 11:33

Re: Rotating log file

Post by Hollow »

Of course :) Did not think of that. Thanks!
Hollow
Posts: 4
Joined: 09 Nov 2013, 11:33

Re: [SOLVED] Rotating log file

Post by Hollow »

If anyone wants to know how I achieved this, I just added this to my script:

Code: Select all

For /f "tokens=1-4 delims=. " %%a in ('date /t') do (set mydate=%%a-%%b_%%c)
For /f "tokens=1-3 delims=/:/ " %%a in ('time /t') do (set mytime=%%a-%%b)
then in the Filebot execute:

Code: Select all

filebot.exe" -script fn:suball -get-missing-subtitles "%FullPath%" -r --output srt --lang en --log-file Missing_%mydate%_%mytime%.log --log warning
Post Reply