Change in osmo-trx[master]: logger: allow disabling all logging at compile time

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/.

Hoernchen gerrit-no-reply at lists.osmocom.org
Thu Aug 27 14:57:23 UTC 2020


Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/19804 )

Change subject: logger: allow disabling all logging at compile time
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-trx/+/19804/1/CommonLibs/Logger.h 
File CommonLibs/Logger.h:

https://gerrit.osmocom.org/c/osmo-trx/+/19804/1/CommonLibs/Logger.h@55 
PS1, Line 55: #define MAYBE_LOG(src, level) if (!log_check_level(src, level) || DISABLE_ALL_LOGGING) {} else
> So there's two things here in the same patch: […]
Well the problem is even if you undef the actual logging macro everything else still happens and the stream is still being fed a log line in small chunks.

As long as convenient stream based logging is happening there is no way around protecting the log line stream with a log object, and the checks happen too late, and there is no way around that within the log object. 

The only way is therefore to either ditch the stream and change all log lines to a function call or to "wrap" them with this if macro that has to end without braces and unfortunately gets killed by the useless werror...



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/19804
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I353ded020844eb4df7d7803785663789f8211d23
Gerrit-Change-Number: 19804
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 27 Aug 2020 14:57:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200827/18621327/attachment.htm>


More information about the gerrit-log mailing list