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

Logging directive doesn't get expanded after initial start #12

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 4 comments
Open
Labels

Comments

@GoogleCodeExporter
Copy link

For a log directive like:

global log="%N/%Y-%m-%d.log"

the variables will be expanded when conman starts, and you'll get logs like:

server1/2012-03-15.log

However, all log entries will be written to this file until the process is restarted. It would be nice if these variables could be expanded when log lines need to be written (or at least periodically) in order to permit automatic log file changes (e.g. to server1/2012-03-16.log the next day).

Original issue reported on code.google.com by [email protected] on 21 Mar 2012 at 10:39

@GoogleCodeExporter
Copy link
Author

conmand will re-evaluate conversion specifiers within filenames and re-open log files if it receives a SIGHUP.

Original comment by chris.m.dunlap on 21 Mar 2012 at 10:47

@GoogleCodeExporter
Copy link
Author

BTW, this has been the behavior since 0.1.8.5.

Did you have something else in mind?

Original comment by chris.m.dunlap on 21 Mar 2012 at 11:05

@GoogleCodeExporter
Copy link
Author

Yeah, I was hoping it would function more like automatically rolling the logs as the time changed, sort of how cronolog works for Apache.

I can achieve my desired behavior by HUPing conmand at midnight, which is fine. So maybe all that's needed is a note in the docs that the variables are only expanded at start and when the config is reloaded in order to manage user expectations?

Original comment by [email protected] on 21 Mar 2012 at 11:26

@GoogleCodeExporter
Copy link
Author

This issue was updated by svn:r1077 / 92d014a.

Conversion specifiers within console log filenames are evaluated
when the file is opened; this occurs when conmand first starts and
whenever it receives a SIGHUP.

Original comment by chris.m.dunlap on 27 Mar 2012 at 9:51

@dun dun added feature and removed auto-migrated labels May 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants