1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

use log attribute %(process)d instead of os.getpid (#18691)

This commit is contained in:
Adrian Likins 2016-11-30 19:26:47 -05:00 committed by Matt Clay
parent ba56c87566
commit 47a7cb733a

View file

@ -15,7 +15,7 @@ logger = logging.getLogger('injector') # pylint: disable=locally-disabled, inva
def main(): def main():
"""Main entry point.""" """Main entry point."""
formatter = logging.Formatter('%(asctime)s ' + str(os.getpid()) + ' %(levelname)s %(message)s') formatter = logging.Formatter('%(asctime)s %(process)d %(levelname)s %(message)s')
log_name = 'ansible-test-coverage.%s.log' % getpass.getuser() log_name = 'ansible-test-coverage.%s.log' % getpass.getuser()
self_dir = os.path.dirname(os.path.abspath(__file__)) self_dir = os.path.dirname(os.path.abspath(__file__))