<p style="white-space: pre-wrap; word-wrap: break-word;">found some hither nor thither with logging ... either set</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  log_set_category_filter(osmo_stderr_target, DLGLOBAL, 1, LOGL_DEBUG);</pre><p style="white-space: pre-wrap; word-wrap: break-word;">and also see the debug logging from the implementation, or remove logging from the regression test entirely. (no DMAIN needed)</p><p style="white-space: pre-wrap; word-wrap: break-word;">Also rather printf to stdout only.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I know it is just copying from osmo-bsc, but still...</p><p style="white-space: pre-wrap; word-wrap: break-word;">here the stuff I wrote before...</p><p>Patch set 5:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/10185">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10185/5/src/gsm/gsm48_arfcn_range_encode.c">File src/gsm/gsm48_arfcn_range_encode.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/src/gsm/gsm48_arfcn_range_encode.c@26">Patch Set #5, Line 26:</a> <code style="font-family:monospace,monospace">#include <osmocom/core/logging.h></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">looks like this file has no logging.<br>That's a good thing. We don't need this header?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/src/gsm/gsm48_arfcn_range_encode.c@213">Patch Set #5, Line 213:</a> <code style="font-family:monospace,monospace">                 k, wk_len, octet_offs, bit_offs, level, lvl_left);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">ah damn. I think in a libosmocore utility function like this we shouldn't log though? not sure...</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10185/5/tests/gsm0408/gsm0408_test.c">File tests/gsm0408/gsm0408_test.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/tests/gsm0408/gsm0408_test.c@618">Patch Set #5, Line 618:</a> <code style="font-family:monospace,monospace">                                       int arfcns_num, int silent)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(weird indent .. but this is just copying, right?)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/tests/gsm0408/gsm0408_test.c@646">Patch Set #5, Line 646:</a> <code style="font-family:monospace,monospace">                  range, arfcns_used, f0, f0_included);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">rather printf()?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/tests/gsm0408/gsm0408_test.c@702">Patch Set #5, Line 702:</a> <code style="font-family:monospace,monospace">         fprintf(stderr, " w = ");</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">printf</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/tests/gsm0408/gsm0408_test.c@705">Patch Set #5, Line 705:</a> <code style="font-family:monospace,monospace">             fprintf(stderr, "\n");</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10185/5/tests/gsm0408/gsm0408_test.c@941">Patch Set #5, Line 941:</a> <code style="font-family:monospace,monospace">   log_init(&log_info, NULL);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Usually in regression tests, to get reproducable output I have to call:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">        log_set_use_color(osmo_stderr_target, 0);<br>        log_set_print_timestamp(osmo_stderr_target, 0);<br>        log_set_print_filename(osmo_stderr_target, 0);</pre><p style="white-space: pre-wrap; word-wrap: break-word;">so how does it work that you get reproducable output on stderr? Is that even DMAIN logging there?</p><p style="white-space: pre-wrap; word-wrap: break-word;">If there is no logging happening, we could either not init logging at all, or have empty categories[].</p><p style="white-space: pre-wrap; word-wrap: break-word;">You could also decide to ignore stderr; if this is from fprintf(stderr,..) then maybe rather printf() to stdout</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/10185">change 10185</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10185"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c </div>
<div style="display:none"> Gerrit-Change-Number: 10185 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Stefan Sperling <stsp@stsp.name> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Stefan Sperling <stsp@stsp.name> </div>
<div style="display:none"> Gerrit-CC: Holger Freyther <holger@freyther.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 11 Dec 2018 11:35:01 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>