Archiving - tip

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Archiving - tip

alano
I'm not sure whether my tip is true in 100% of cases, but I've spent 4 days (on and off) trying to get archiving to work.  I was getting exception error saying "length cannot be less than zero", and the target logfile was never being written to.

It appears (caveat emptor) that you must include "{#####}" somewhere within the archiveFileName (the number of "#"'s is probably not important).

For instance, when I changed the config parameter from this:-
archiveFileName="${nlogdir}/logArchives/log.${date:format=yyyyMMdd}.txt"

to this:-
archiveFileName="${nlogdir}/logArchives/log.${date:format=yyyyMMdd}.{#####}.txt"

...archiving suddenly started working!!!!!!

Hope this helps someone.  And if my tip is universally true (please respond with your own observations), perhaps someone could amend the Documentation Wiki to indicate that "{#####}" is mandatory within the archiveFileName layout.

Alan