mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Slightly refine log output to include username in addition to pid.
This commit is contained in:
parent
ba8f2fca26
commit
e90023281d
1 changed files with 4 additions and 2 deletions
|
@ -25,13 +25,15 @@ import fnmatch
|
|||
import tempfile
|
||||
import fcntl
|
||||
import constants
|
||||
import getpass
|
||||
from ansible.color import stringc
|
||||
|
||||
import logging
|
||||
if constants.DEFAULT_LOG_PATH != '':
|
||||
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))
|
||||
mypid = str(os.getpid())
|
||||
user = getpass.getuser()
|
||||
logger = logging.getLogger("p=%s u=%s | " % (mypid, user))
|
||||
|
||||
callback_plugins = [x for x in utils.plugins.callback_loader.all()]
|
||||
|
||||
|
|
Loading…
Reference in a new issue