Attention is currently required from: neels, pespin.
laforge has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171 )
Change subject: tweak lots of logging
......................................................................
Patch Set 5:
(1 comment)
File src/osmo-hnbgw/hnbgw_cn.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171/comment/018177f3_8fac6590
PS3, Line 515: LOG_CNLINK(cnlink, DCN, LOGL_NOTICE, "using: cs7-%u %s <-> %s
%s %s\n",
Some context: this is the single "i am
ready" notification for one SCCP link to an MSC or SGSN. […]
multi-line logging
is allways a PITA from the point of anyone trying to process log files. You cannot
reasonably grep for context, if some part of a messge is printed int one line and some
part of the same logical message is in another line. You'd have to grep for one of
the messages and then get back with some other tool to see the remainder of the message.
IMHO, we should avoid it at all costs. Yes, there are some historical cases where we do
have multi-line logging, but I consider those as "we were young and stupid"
rather than a good example.
In order to work around the problem I added those LOGPC / DEBUGPC macros. Those worked
fine back when all log targets were writing to stderr or to a file. They break
unfortunately with syslog, systemd or gsmtap logging, so they are discouraged, too. Maybe
we should actually OSMO_DEPRECATE them.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I41275d8c3e272177976a9302795884666c35cd06
Gerrit-Change-Number: 33171
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Jun 2023 09:40:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment