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

Have rear-$(hostname)-$WORKFLOW-<date>.log in any case #712

Closed
jsmeix opened this issue Nov 25, 2015 · 3 comments
Closed

Have rear-$(hostname)-$WORKFLOW-<date>.log in any case #712

jsmeix opened this issue Nov 25, 2015 · 3 comments

Comments

@jsmeix
Copy link
Member

jsmeix commented Nov 25, 2015

Currently subsequent runs of "rear <workflow>"
keep exactly one old log file in a hardcoded way
in usr/sbin/rear

# Keep old log file:
if test -r "$LOGFILE" ; then
    mv -f "$LOGFILE" "$LOGFILE".old 2>&8
fi

Because of #709 (comment) I like to discuss here
whether or not this should be changed to use rear-$(hostname)-$WORKFLOW-.log in any case

The advantage is that unlimited old log files are kept.

The disadvantage is that unlimited old log files are kept
which could fill up the harddisk.

Perhaps the solution is to make the behaviour configurable
via usr/share/rear/conf/default.conf and voila! it is already there

LOGFILE="$LOG_DIR/rear-$HOSTNAME.log"

The admin can change this to

LOGFILE="$LOG_DIR/rear-$HOSTNAME-$WORKFLOW-$( date -Iseconds ).log"

Therefore from my point of view there is nothing to change here
and I set this issue initially to "fixed" and "waiting for feedback".

FYI:
With unique LOGFILE names like

LOGFILE="$LOG_DIR/rear-$( date -Iseconds ).log"

one does not get *.old copies because for each "rear" run
the new LOGFILE name does not already exist.

@pavoldomin
Copy link
Contributor

I support @jsmeix point, we should not modify the existing defaults: admins may have implemented some post-processing with the rear log file (parse it/copy it somewhere/...) and changing the default name would break that.

@gdha
Copy link
Member

gdha commented Nov 25, 2015

Currently we have ./usr/share/rear/conf/default.conf:LOGFILE="$LOG_DIR/rear-$HOSTNAME.log" as a default. If there is a consensus to keep it as it is now then that is fine for me.
Others may have a different opinion, but then I would like to read it here...

@jsmeix
Copy link
Member Author

jsmeix commented Nov 25, 2015

Because there is general agreement not to change
the default log file name, I close this issue.

@jsmeix jsmeix closed this as completed Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants