use the correct logger for the callback receiver

the callback receiver and dispatcher share several modules, so add logic
to use the correct logger
This commit is contained in:
Ryan Petrello
2019-03-15 08:08:32 -04:00
parent c6ae7d84a2
commit 32ee9838af
2 changed files with 11 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import logging
import os
import random
import sys
import traceback
from uuid import uuid4
@@ -18,7 +19,10 @@ import psutil
from awx.main.models import UnifiedJob
from awx.main.dispatch import reaper
logger = logging.getLogger('awx.main.dispatch')
if 'run_callback_receiver' in sys.argv:
logger = logging.getLogger('awx.main.commands.run_callback_receiver')
else:
logger = logging.getLogger('awx.main.dispatch')
class PoolWorker(object):