Skip to content

Commit

Permalink
Added log info messages indicating when the gateway starts and stop.
Browse files Browse the repository at this point in the history
Changed multi-line log info messages to multiple single-line info
messages, allowing for automated log file parsing and file consistency.
  • Loading branch information
drm-slac committed Aug 29, 2023
1 parent f2e500f commit 1a4d643
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/p4p/gw.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ def getargs():
class App(object):

def __init__(self, args):
_log.info( '*** Gateway STARTS now using "%s".'%args.config)
args._all_config_files = [args.config]
with open(args.config, 'r') as F:
jconf = F.read()
Expand Down Expand Up @@ -554,7 +555,10 @@ def __init__(self, args):
if 'serverport' in jcli:
client_conf['EPICS_PVA_SERVER_PORT'] = str(jcli['serverport'])

_log.info("Client %s input config:\n%s", name, pprint.pformat(client_conf))
_log.info( "Client effective configuration for %s:", name)
for confKeys, confVals in client_conf.items():
_log.info( " %s : %s", confKeys, confVals)

if args.test_config:
clients[name] = None
else:
Expand Down Expand Up @@ -684,7 +688,9 @@ def __init__(self, args):
self.stats.servers.append(server._S)
# we're live now...

_log.info("Server effective config %s :\n%s", name, pprint.pformat(server.conf()))
_log.info( "Server effective configuration for %s:", name)
for confKeys, confVals in server.conf().items():
_log.info( " %s : %s", confKeys, confVals)

for spv in statusp.keys():
_log.info('Status PV: %s', spv)
Expand Down Expand Up @@ -728,6 +734,7 @@ def run(self):
except KeyboardInterrupt:
pass
finally:
_log.info( '*** Gateway STOPS now.')
[server.stop() for server in self.servers.values()]

@staticmethod
Expand Down

0 comments on commit 1a4d643

Please sign in to comment.