[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Duplicity-talk] Log patch
From: |
Michael Terry |
Subject: |
[Duplicity-talk] Log patch |
Date: |
Sun, 9 Nov 2008 15:29:21 -0500 |
Here's a second shot at adding machine-readable output to duplicity.
This version depends on nothing more than the logging module in
Python. No glib or dbus.
It adds two new arguments (--log-fd and --log-file). It writes to the
fd or file well-formed 'stanzas' as normal duplicity messages are
output.
For example, if duplicity was going to put an error about command line
syntax, the log would show:
ERROR 2\n
. Command line error: Expected 2 args, got 0\n
. Enter 'duplicity --help' for help screen.\n
\n
The stanza starts with a keyword, has a message id number, followed by
some suggested user text and ending with a newline. Currently, the
'named' verbosity levels are all supported (DEBUG, INFO, NOTICE,
WARNING, ERROR).
You can output to multiple files or fd at a time. As part of this
change, I rewrote the current logging to use the logging module too.
I've attached the diff, the readme, and a small unit test file.
Like the first patch, I also made some additional small changes -- I
made the return value for --help be 0, and I added some message id
numbers: ERROR 2 is command line syntax error, 3 is source mismatch.
WARNING 2 -> 6 are certain 'unmatched files were found' warnings.
Eh?
-mt
log.diff
Description: Text Data
LOG-README
Description: Binary data
logtest.py
Description: Text Data
- [Duplicity-talk] Log patch,
Michael Terry <=
- Re: [Duplicity-talk] Log patch, edgar . soldin, 2008/11/10
- Re: [Duplicity-talk] Log patch, Peter Schuller, 2008/11/10
- Re: [Duplicity-talk] Log patch, Michael Terry, 2008/11/10
- Re: [Duplicity-talk] Log patch, Michael Terry, 2008/11/10
- Re: [Duplicity-talk] Log patch, Kenneth Loafman, 2008/11/12
- Re: [Duplicity-talk] Log patch, Kenneth Loafman, 2008/11/12
- Re: [Duplicity-talk] Log patch, Michael Terry, 2008/11/12
- Re: [Duplicity-talk] Log patch, Kenneth Loafman, 2008/11/12
- Re: [Duplicity-talk] Log patch, Michael Terry, 2008/11/12