Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
e35bd75a
Commit
e35bd75a
authored
8 years ago
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Capitalize logger, since it's a constant
parent
850b696e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
playbooks/callback_plugins/task_timing.py
+4
-4
No files found.
playbooks/callback_plugins/task_timing.py
View file @
e35bd75a
...
...
@@ -10,7 +10,7 @@ import sys
logging
.
basicConfig
(
level
=
logging
.
INFO
,
stream
=
sys
.
stdout
)
logging
.
getLogger
(
"requests"
)
.
setLevel
(
logging
.
WARNING
)
logging
.
getLogger
(
"dd"
)
.
setLevel
(
logging
.
WARNING
)
logger
=
logging
.
getLogger
(
__name__
)
LOGGER
=
logging
.
getLogger
(
__name__
)
"""
Originally written by 'Jharrod LaFon'
...
...
@@ -76,7 +76,7 @@ class DatadogFormatter(Formatter):
tags
=
[
"playbook:{0}"
.
format
(
self
.
clean_tag_value
(
playbook_name
))]
)
except
Exception
as
ex
:
logger
.
error
(
ex
.
message
)
LOGGER
.
error
(
ex
.
message
)
class
JsonFormatter
(
Formatter
):
...
...
@@ -134,14 +134,14 @@ class LoggingFormatter(Formatter):
)
for
name
,
timestamp
in
sorted_results
[:
10
]:
logger
.
info
(
LOGGER
.
info
(
"{0:-<80}{1:->8}"
.
format
(
'{0} '
.
format
(
name
),
' {0:.02f}s'
.
format
(
timestamp
.
duration
.
total_seconds
()),
)
)
logger
.
info
(
"
\n
Playbook {0} finished: {1}, {2} total tasks. {3} elapsed.
\n
"
.
format
(
LOGGER
.
info
(
"
\n
Playbook {0} finished: {1}, {2} total tasks. {3} elapsed.
\n
"
.
format
(
playbook_name
,
time
.
asctime
(),
len
(
results
),
...
...
This diff is collapsed.
Click to expand it.
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