This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12146 )
Change subject: Trap handlers: log request/reply as info level
......................................................................
Trap handlers: log request/reply as info level
Log the basic location-state trap triggering request and command reply
as info level - that way we can receive useful information without
turning on full debug output.
Change-Id: If8eae9f36292930571954becf6613fada43d301c
---
M osmopy/trap_helper.py
M scripts/ctrl2cgi.py
M scripts/soap.py
3 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
diff --git a/osmopy/trap_helper.py b/osmopy/trap_helper.py
index b7202ac..3e80c6d 100644
--- a/osmopy/trap_helper.py
+++ b/osmopy/trap_helper.py
@@ -60,7 +60,7 @@
Command processor: takes function f to run for each command
"""
bsc_id = comm[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format
- log.debug("BSC %s commands: %r" % (bid, comm))
+ log.info("BSC %s commands: %r" % (bid, comm))
for t in comm:
(_, m) = Ctrl().cmd(*t.split())
f(m)
diff --git a/scripts/ctrl2cgi.py b/scripts/ctrl2cgi.py
index addca2f..5c675bc 100755
--- a/scripts/ctrl2cgi.py
+++ b/scripts/ctrl2cgi.py
@@ -104,7 +104,7 @@
Handle location-state TRAP: parse trap content, build CGI Request and use treq's routines to post it while setting up async handlers
"""
params = make_params(bsc, data)
- self.factory.log.debug('location-state@%s.%s.%s.%s (%s) => %s' % (net, bsc, bts, trx, params['time_stamp'], data))
+ self.factory.log.info('location-state@%s.%s.%s.%s (%s) => %s' % (net, bsc, bts, trx, params['time_stamp'], data))
params['h'] = gen_hash(params, self.factory.secret_key)
# Ensure that we run only limited number of requests in parallel:
self.factory.semaphore.run(make_async_req, self.factory.location, params, self.transport.write, self.factory.log)
diff --git a/scripts/soap.py b/scripts/soap.py
index f771530..5817988 100755
--- a/scripts/soap.py
+++ b/scripts/soap.py
@@ -86,7 +86,7 @@
Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers
"""
params = make_params(bsc, data)
- self.factory.log.debug('location-state@%s.%s.%s.%s (%s) => %s' % (net, bsc, bts, trx, params['time_stamp'], data))
+ self.factory.log.info('location-state@%s.%s.%s.%s (%s) => %s' % (net, bsc, bts, trx, params['time_stamp'], data))
ctx = self.factory.client.registerSiteLocation(bsc, float(params['lon']), float(params['lat']), params['position_validity'], params['time_stamp'], params['oper_status'], params['admin_status'], params['policy_status'])
d = post(self.factory.location, ctx.envelope)
d.addCallback(collect, partial(handle_reply, ctx.process_reply, params['bsc_id'], self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx
--
To view, visit https://gerrit.osmocom.org/12146
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If8eae9f36292930571954becf6613fada43d301c
Gerrit-Change-Number: 12146
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181206/cb607de3/attachment.htm>