Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archivepath is interpreted differently depending on the value of archiveexploded #130

Open
jonsyu1 opened this issue Oct 2, 2016 · 0 comments

Comments

@jonsyu1
Copy link
Contributor

jonsyu1 commented Oct 2, 2016

Problem: archivepath is interpreted as directory when exploded and file when unexploded.

Suggestion: We may not want to break API, but this should be noted in both the wiki.

Suggestion: The rolling filewriter should also report the error when the rolling filewriter fails to create the unexploded archive (the user probably specified a directory, since that's the expected value when archiveexploded is true.

Repro steps:
Configure seelog with archivepath pointing to an existing directory and archiveexploded="false"
<rollingfile formatid="ourlogStdout" type="date" filename="./var/log/axiom.log" datepattern="2006-01-02_03:04:05" archivetype="gzip" maxrolls="1" archivepath="./var/log" archiveexploded="false"/>

Expected:
Error creating unexploded archive at "./var/log": is a directory

Actual:
Silent failure: no archive created, files continue to be deleted on roll

Conversely, the rolling filewriter should report an error when it points to a file.

Repro steps:
Configure seelog with archivepath pointing at an existing file and archiveexploded="true"
<rollingfile formatid="ourlogStdout" type="date" filename="./var/log/axiom.log" datepattern="2006-01-02_03:04:05" archivetype="gzip" maxrolls="1" archivepath="./var/log/axiom.log.tgz" archiveexploded="true"/>

Expected:
Error creating exploded archive under `"./var/log/axiom.log.tgz": is a file

Actual:
Silent failure: no archives created, files continue to be deleted on roll

Bottom line:
This is pretty easily recognizable, but I don't want users to change their archiveexploded setting and accidentally lose logs on roll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant