Attention is currently required from: arehbein, laforge.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34881?usp=email )
Change subject: gsmtap_util: Simplify sink
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34881?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4025920d5f62d17133e9b5fe81cd34a88c4f20b5
Gerrit-Change-Number: 34881
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 08 Nov 2023 18:16:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: arehbein, daniel.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )
Change subject: logging_gsmtap: Temporarily disable logging when sending the logs
......................................................................
Patch Set 2:
(2 comments)
File src/core/logging_gsmtap.c:
https://gerrit.osmocom.org/c/libosmocore/+/34966/comment/97b4a79f_937de618
PS1, Line 117: the
> small addition (while we're at it): The verb is missing, so maybe sth. like […]
Done
https://gerrit.osmocom.org/c/libosmocore/+/34966/comment/bdbd6fb9_709908d6
PS1, Line 119: target->loglevel = LOGL_FATAL + 1;
> Unlike sub-systems, it's highly unlikely that we'd add log levels - I don't think we ever have. […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Nov 2023 18:07:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: arehbein, daniel, laforge.
laforge has uploaded a new patch set (#2) to the change originally created by daniel. ( https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: logging_gsmtap: Temporarily disable logging when sending the logs
......................................................................
logging_gsmtap: Temporarily disable logging when sending the logs
This avoids an infinite recursion when sending a gsmtap log message
causes a log message.
Temporarily set target->loglevel higher than LOGL_FATAL, which
effectively disables logging for that target. Other targets like stderr
will still log this message so there is still an indication that
something went wrong.
Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Related: OS#6213
---
M src/core/logging_gsmtap.c
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/34966/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: arehbein, daniel.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )
Change subject: logging_gsmtap: Temporarily disable logging when sending the logs
......................................................................
Patch Set 1:
(1 comment)
File src/core/logging_gsmtap.c:
https://gerrit.osmocom.org/c/libosmocore/+/34966/comment/4a2b36c5_74e13db0
PS1, Line 119: target->loglevel = LOGL_FATAL + 1;
> Just learned something new from reviewing another patch... […]
Unlike sub-systems, it's highly unlikely that we'd add log levels - I don't think we ever have. But still, UINT8_MAX should do the trick.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Nov 2023 18:05:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/34981?usp=email )
Change subject: the git:// protocol is deprecated for a long time; use https:// instead
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/34981?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Ic31d381b25d31f6ab5ce609a544321bc74008902
Gerrit-Change-Number: 34981
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 07 Nov 2023 16:52:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34975?usp=email )
Change subject: logging: ensure ANSI color escape is sent in same line/before newline
......................................................................
logging: ensure ANSI color escape is sent in same line/before newline
This fixes multi-line color clobbering in logging daemons like
systemd-journald, which work with single-lines only.
Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Closes: OS#6249
---
M src/core/logging.c
M tests/loggingrb/logging_test.err
2 files changed, 24 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/core/logging.c b/src/core/logging.c
index c6774f5..dc19cf3 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -616,7 +616,15 @@
}
if (target->use_color && c_subsys) {
- ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ /* Ensure the last color escape is sent before the newline
+ * (to not clobber journald, which works on single-lines only) */
+ if (offset > 0 && buf[offset - 1] == '\n') {
+ offset--; rem++;
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END "\n");
+ } else {
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ }
+
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
diff --git a/tests/loggingrb/logging_test.err b/tests/loggingrb/logging_test.err
index b59d2e8..e070561 100644
--- a/tests/loggingrb/logging_test.err
+++ b/tests/loggingrb/logging_test.err
@@ -1,3 +1,2 @@
-[1;31mYou should see this
-[0;m[1;32mYou should see this
-[0;m
\ No newline at end of file
+[1;31mYou should see this[0;m
+[1;32mYou should see this[0;m
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34975?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Gerrit-Change-Number: 34975
Gerrit-PatchSet: 5
Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged