aboutsummaryrefslogtreecommitdiffstats
path: root/pathod
diff options
context:
space:
mode:
Diffstat (limited to 'pathod')
-rwxr-xr-xpathod12
1 files changed, 10 insertions, 2 deletions
diff --git a/pathod b/pathod
index 56f6e3fe..144e01b5 100755
--- a/pathod
+++ b/pathod
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import argparse, sys, logging
+import argparse, sys, logging, logging.handlers
from libpathod import pathod, utils, version
if __name__ == "__main__":
@@ -19,6 +19,10 @@ if __name__ == "__main__":
help='Directory for static files.'
)
parser.add_argument(
+ "-f", dest='logfile', default=None, type=str,
+ help='Log file.'
+ )
+ parser.add_argument(
"--debug", dest='debug', default=False, action="store_true",
help='Enable debug output.'
)
@@ -86,6 +90,10 @@ if __name__ == "__main__":
)
if not args.debug:
logging.disable(logging.DEBUG)
+ if args.logfile:
+ ch = logging.handlers.WatchedFileHandler(args.logfile)
+ root.addHandler(ch)
+
sizelimit = None
if args.sizelimit:
@@ -104,7 +112,7 @@ if __name__ == "__main__":
sizelimit = sizelimit,
noweb = args.noweb,
nocraft = args.nocraft,
- noapi = args.noapi,
+ noapi = args.noapi,
nohang = args.nohang
)
except pathod.PathodError, v: