summaryrefslogtreecommitdiffstats
path: root/logactio
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2013-12-26 00:11:37 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2013-12-26 00:22:32 +0100
commit1e97c1c6537724fc3f4866da06b1e380471c1c06 (patch)
treeb161f348c4b8c380e1d0fcc2320c5fc2d889871e /logactio
parent8655f934aabe1ba64668cb9dfff6e3e65e79083a (diff)
downloadlogactio-1e97c1c6537724fc3f4866da06b1e380471c1c06.tar.gz
logactio-1e97c1c6537724fc3f4866da06b1e380471c1c06.tar.xz
logactio-1e97c1c6537724fc3f4866da06b1e380471c1c06.zip
Added logging to stdout
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'logactio')
-rwxr-xr-xlogactio4
1 files changed, 3 insertions, 1 deletions
diff --git a/logactio b/logactio
index d56bf70..58c1e7e 100755
--- a/logactio
+++ b/logactio
@@ -47,7 +47,7 @@ if __name__ == '__main__':
parser.add_option("-v", "--verbose", action="count", default=0,
dest="verb",
help="Increase the log verbosity")
- parser.add_option("-L", "--log-type", type="choice", choices=["syslog","file"],
+ parser.add_option("-L", "--log-type", type="choice", choices=["syslog","file", "stdout"],
dest="logtype", default="syslog",
help="Should logging go to file or syslog? (default: %default)")
parser.add_option("-l", "--log-file",
@@ -66,6 +66,8 @@ if __name__ == '__main__':
logger = Logger.Logger(Logger.LOGTYPE_SYSLOG, opts.syslogid, opts.verb)
elif opts.logtype == "file":
logger = Logger.Logger(Logger.LOGTYPE_FILE, opts.logfile, opts.verb)
+ elif opts.logtype == "stdout":
+ logger = Logger.Logger(Logger.LOGTYPE_STDOUT, opts.logfile, opts.verb)
else:
raise Exception("Unknown log type '%s'" % opts.logtype)