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
cd057e1d
Commit
cd057e1d
authored
Apr 14, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save a string concatenation per log line when not required.
parent
3c1a4794
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
apachedex/__init__.py
apachedex/__init__.py
+4
-4
No files found.
apachedex/__init__.py
View file @
cd057e1d
...
@@ -678,8 +678,8 @@ DURATION_US_FORMAT = '%D'
...
@@ -678,8 +678,8 @@ DURATION_US_FORMAT = '%D'
DURATION_S_FORMAT
=
'%T'
DURATION_S_FORMAT
=
'%T'
server_name_group_dict
=
{
server_name_group_dict
=
{
'%v'
:
lambda
x
:
x
.
group
(
'servername'
)
+
'/'
,
'%v'
:
lambda
x
,
path
:
x
.
group
(
'servername'
)
+
'/'
+
path
,
'%V'
:
lambda
x
:
x
.
group
(
'canonical_servername'
)
+
'/'
,
'%V'
:
lambda
x
,
path
:
x
.
group
(
'canonical_servername'
)
+
'/'
+
path
,
}
}
logformat_dict
=
{
logformat_dict
=
{
...
@@ -1174,7 +1174,7 @@ def main():
...
@@ -1174,7 +1174,7 @@ def main():
parser
.
error
(
'--match-servername %s requested, but missing '
parser
.
error
(
'--match-servername %s requested, but missing '
'from logformat.'
%
args
.
match_servername
)
'from logformat.'
%
args
.
match_servername
)
get_url_prefix
=
server_name_group_dict
.
get
(
args
.
match_servername
,
get_url_prefix
=
server_name_group_dict
.
get
(
args
.
match_servername
,
lambda
_
:
''
)
lambda
_
,
path
:
path
)
line_regex
=
''
line_regex
=
''
expensive_line_regex
=
''
expensive_line_regex
=
''
try
:
try
:
...
@@ -1318,7 +1318,7 @@ def main():
...
@@ -1318,7 +1318,7 @@ def main():
url
=
url_match
.
group
(
'url'
)
url
=
url_match
.
group
(
'url'
)
if
url
.
startswith
(
'http'
):
if
url
.
startswith
(
'http'
):
url
=
splithost
(
splittype
(
url
)[
1
])[
1
]
url
=
splithost
(
splittype
(
url
)[
1
])[
1
]
url
=
get_url_prefix
(
match
)
+
url
url
=
get_url_prefix
(
match
,
url
)
for
site
,
prefix_match
,
action
in
site_list
:
for
site
,
prefix_match
,
action
in
site_list
:
if
prefix_match
(
url
)
is
not
None
:
if
prefix_match
(
url
)
is
not
None
:
break
break
...
...
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