Plans for logging changes, which are a prereq to further work on
background tasks:
* Moving forward, we are going to be removing all /print/ calls from
cobblerd actions, as all actions will be through cobblerd, as a result,
there will be no printing.
* We will be replacing all traceback.print_exc() calls with
utils.log_exc(logger)
* All subprocess calls will be replaced with a utils.something() call
that also takes a logger, logs the command executed as a "info" entry
and then logs the output in the same file.
* All prints will be replaced, for starters, with logger.info, unless
it's obvious that they are warning messages (logger.warning) or error
messages (logger.error).
* All CobblerExceptions will be logged by logger.error.
* Each background task gets a log in /var/log/cobbler/tasks/$id.log, if
there is no task, it will be logged in /var/log/cobbler/cobbler.log
We may want to change that format a bit, so tasks starting up later with
the same id don't cause confusion (something like
taskname_yyyymmmdd_id.log). We should also probably package a log rotate
script to compress these.
* Cobblerd.log goes away -- there's no need to seperate local and
remote
logs
* When new tasks are created, the name of the log file will be mentioned
in the log -- ditto for tasks completing or failing.
* The CLI will most likely tail log files (unless requested not too) to
give the impression of being local.
Hopefully that makes sense. If not, it should be more self evident
from coming commits. The changes are actually relatively minimal and
somewhat overdue.
Because of the changes for logging, the local CLI (which now has a
split-brain problem with cobblerd until it is properly remoted on the
2.0 branch as planned) -- may not show output for some
actions like you would expect.
Given, however, this is /the/ item I'm working on until it's finished,
so don't dispair for long... If you are using the development branch in
any sort of "important" capacity, consider the warning
that we do not intend for it to be useful or stable at this time :)
--Michael
_______________________________________________
cobbler-devel mailing list
cobbler-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.