Skip to content

Commit

Permalink
gladevcp -add the basename to logger text
Browse files Browse the repository at this point in the history
Now with multiple instances of gladevcp, you can differentiate
the messages
  • Loading branch information
c-morley committed Sep 29, 2024
1 parent d2f4f0f commit dfc2bb8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hal/user_comps/gladevcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
# We have do do this before importing other modules because on import
# they set up their own loggers as children of the base logger.
from qtvcp import logger
LOG = logger.initBaseLogger('GladeVCP', log_file=None, log_level=logger.INFO)

LOG = None

options = [ Option( '-c', dest='component', metavar='NAME'
, help="Set component name to NAME. Default is basename of UI file")
Expand Down Expand Up @@ -187,6 +186,10 @@ def main():
parser.print_help()
sys.exit(1)

temp = os.path.splitext(os.path.basename(args[0]))[0]
global LOG
LOG = logger.initBaseLogger('GladeVCP-'+ temp, log_file=None, log_level=logger.INFO)

gladevcp_debug = debug = opts.debug
if opts.debug:
# Log level defaults to INFO, so set lower if in debug mode
Expand Down

0 comments on commit dfc2bb8

Please sign in to comment.