Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
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
ansible
Commits
ba8f2fca
Commit
ba8f2fca
authored
Apr 28, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add_pid_to_logging' of
git://github.com/mcodd/ansible
into devel
parents
df3c4849
3b8f69ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lib/ansible/callbacks.py
+5
-3
No files found.
lib/ansible/callbacks.py
View file @
ba8f2fca
...
@@ -29,7 +29,9 @@ from ansible.color import stringc
...
@@ -29,7 +29,9 @@ from ansible.color import stringc
import
logging
import
logging
if
constants
.
DEFAULT_LOG_PATH
!=
''
:
if
constants
.
DEFAULT_LOG_PATH
!=
''
:
logging
.
basicConfig
(
filename
=
constants
.
DEFAULT_LOG_PATH
,
level
=
logging
.
DEBUG
,
format
=
'
%(asctime)
s
%(message)
s'
)
logging
.
basicConfig
(
filename
=
constants
.
DEFAULT_LOG_PATH
,
level
=
logging
.
DEBUG
,
format
=
'
%(asctime)
s
%(name)
s
%(message)
s'
)
mypid
=
os
.
getpid
()
logger
=
logging
.
getLogger
(
str
(
mypid
))
callback_plugins
=
[
x
for
x
in
utils
.
plugins
.
callback_loader
.
all
()]
callback_plugins
=
[
x
for
x
in
utils
.
plugins
.
callback_loader
.
all
()]
...
@@ -106,9 +108,9 @@ def display(msg, color=None, stderr=False, screen_only=False, log_only=False):
...
@@ -106,9 +108,9 @@ def display(msg, color=None, stderr=False, screen_only=False, log_only=False):
msg
=
msg
.
replace
(
"
\n
"
,
""
)
msg
=
msg
.
replace
(
"
\n
"
,
""
)
if
not
screen_only
:
if
not
screen_only
:
if
color
==
'red'
:
if
color
==
'red'
:
logg
ing
.
error
(
msg
)
logg
er
.
error
(
msg
)
else
:
else
:
logg
ing
.
info
(
msg
)
logg
er
.
info
(
msg
)
log_unflock
()
log_unflock
()
def
call_callback_module
(
method_name
,
*
args
,
**
kwargs
):
def
call_callback_module
(
method_name
,
*
args
,
**
kwargs
):
...
...
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