Permalink
Browse files

Add log file option to main.py

  • Loading branch information...
1 parent b8cd7de commit 624f4789be28adc5b693f4ae79c4cb9f427d3538 Andrew Fleenor committed Aug 21, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 main.py
View
3 main.py
@@ -32,6 +32,7 @@
dest='pad_missing_tcp_data', default=False)
parser.add_option('--strict-http-parsing', action='store_true',
dest='strict_http_parsing', default=False)
+parser.add_option('-l', '--log', dest='logfile', default='pcap2har.log')
options, args = parser.parse_args()
# copy options to settings module
@@ -41,7 +42,7 @@
settings.strict_http_parse_body = options.strict_http_parsing
# setup logs
-logging.basicConfig(filename='pcap2har.log', level=logging.INFO)
+logging.basicConfig(filename=options.logfile, level=logging.INFO)
# get filenames, or bail out with usage error
if len(args) == 2:

0 comments on commit 624f478

Please sign in to comment.