Skip to content

Commit

Permalink
misc: Add and improve info and debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Kissaki committed Mar 15, 2024
1 parent 87e82bb commit 5083234
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mumo.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def dynload_slice(prx):
#
# --- Dynamically retrieves the slice file from the target server
#
info("Loading slice from server")
info("Loading slice from server...")
try:
# Check IcePy version as this internal function changes between version.
# In case it breaks with future versions use slice2py and search for
Expand All @@ -116,6 +116,7 @@ def dynload_slice(prx):
dynslicefile = os.fdopen(dynslicefiledesc, 'w')
dynslicefile.write(slice)
dynslicefile.flush()
debug("Loading slice file %s", dynslicefilepath)
load_slice(dynslicefilepath)
dynslicefile.close()
os.remove(dynslicefilepath)
Expand All @@ -139,7 +140,7 @@ def do_main_program():
# All of this has to go in here so we can correctly daemonize the tool
# without loosing the file descriptors opened by the Ice module

debug('Initializing Ice')
debug('Initializing Ice...')
initdata = Ice.InitializationData()
initdata.properties = Ice.createProperties([], initdata.properties)
for prop, val in cfg.iceraw:
Expand Down Expand Up @@ -549,6 +550,9 @@ def error(self, message):
format='%(asctime)s %(levelname)s %(name)s %(message)s',
stream=logfile)

info("Using config file %s", option.ini)
info("Logging level %d into %s", level, cfg.log.file)

# As the default try to run as daemon. Silently degrade to running as a normal application if this fails
# unless the user explicitly defined what he expected with the -a / -d parameter.
try:
Expand Down

0 comments on commit 5083234

Please sign in to comment.