mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Creating playbook executor and dependent classes
This commit is contained in:
15
v2/ansible/utils/debug.py
Normal file
15
v2/ansible/utils/debug.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
|
||||
from multiprocessing import Lock
|
||||
|
||||
from ansible import constants as C
|
||||
|
||||
global_debug_lock = Lock()
|
||||
def debug(msg):
|
||||
if C.DEFAULT_DEBUG:
|
||||
global_debug_lock.acquire()
|
||||
print("%6d %0.5f: %s" % (os.getpid(), time.time(), msg))
|
||||
sys.stdout.flush()
|
||||
global_debug_lock.release()
|
||||
Reference in New Issue
Block a user