mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 15:34:01 -07:00
Making the switch to v2
This commit is contained in:
parent
8cf4452d48
commit
ce3ef7f4c1
486 changed files with 7948 additions and 9070 deletions
18
lib/ansible/utils/debug.py
Normal file
18
lib/ansible/utils/debug.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
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()
|
Loading…
Add table
Add a link
Reference in a new issue