Skip to content

Commit

Permalink
Add log file option to main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fleenor committed Aug 21, 2012
1 parent b8cd7de commit 624f478
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 624f478

Please sign in to comment.