Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
apachedex
Commits
ff49a276
Commit
ff49a276
authored
Apr 04, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
As a single file is generated, allow using stdout and specifying file name.
parent
3a47b90d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
apachedex/__init__.py
apachedex/__init__.py
+7
-5
No files found.
apachedex/__init__.py
View file @
ff49a276
...
@@ -384,9 +384,8 @@ def main():
...
@@ -384,9 +384,8 @@ def main():
default
=
'%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i" %D'
,
default
=
'%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i" %D'
,
help
=
'Apache LogFormat used to generate provided logs. '
help
=
'Apache LogFormat used to generate provided logs. '
'Default: %(default)r'
)
'Default: %(default)r'
)
parser
.
add_argument
(
'-o'
,
'--out'
,
default
=
os
.
getcwd
(),
parser
.
add_argument
(
'-o'
,
'--out'
,
default
=
'-'
,
help
=
'Directory in which statistic files will be generated. '
help
=
'Filename to write output to. Use - for stdout. Default: %(default)s'
)
'Default: %(default)s'
)
parser
.
add_argument
(
'-q'
,
'--quiet'
,
action
=
'store_true'
,
parser
.
add_argument
(
'-q'
,
'--quiet'
,
action
=
'store_true'
,
help
=
'Suppress warnings about malformed lines.'
)
help
=
'Suppress warnings about malformed lines.'
)
parser
.
add_argument
(
'--js'
,
parser
.
add_argument
(
'--js'
,
...
@@ -520,8 +519,11 @@ def main():
...
@@ -520,8 +519,11 @@ def main():
all_lines
+=
lineno
all_lines
+=
lineno
sys
.
stderr
.
write
(
'%i
\
n
'
%
lineno
)
sys
.
stderr
.
write
(
'%i
\
n
'
%
lineno
)
end_parsing_time
=
time
.
time
()
end_parsing_time
=
time
.
time
()
os
.
chdir
(
args
.
out
)
if
args
.
out
==
'-'
:
with
open
(
'index.html'
,
'w'
)
as
out
:
out
=
sys
.
stdout
else
:
out
=
open
(
args
.
out
,
'w'
)
with
out
:
out
.
write
(
'<html><head><title>Stats</title><style>'
out
.
write
(
'<html><head><title>Stats</title><style>'
'.stats th, .stats td { border: solid 1px #000; } '
'.stats th, .stats td { border: solid 1px #000; } '
'.stats th { text-align: center; } '
'.stats th { text-align: center; } '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment