<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/20296">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/20296/4/src/logging.c">File src/logging.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/libosmocore/+/20296/4/src/logging.c@856">Patch Set #4, Line 856:</a> <code style="font-family:monospace,monospace">   unsigned int len = strlen(log);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Would be great checking if strlen() is already done in caller of output() function, to see if we can avoid recalculating it here by passing it as a parameter.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/20296/4/src/logging.c@869">Patch Set #4, Line 869:</a> <code style="font-family:monospace,monospace">    osmo_wqueue_enqueue_quiet(target->tgt_file.wqueue, msg);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">here it fails if wqueue is too full right? What about manually introducing a last msgb with content "QUEUE WAS FULL", that should be helpful.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/20296/4/src/logging.c@926">Patch Set #4, Line 926:</a> <code style="font-family:monospace,monospace">       if (rc != msgb_length(msg))</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Here, upon short write (possible if we are in NONBLOCK afaiu) instead of returning error and losing logging data, we should recreate a new msgb and prepend it to the queue so it's printed next time writing is available.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/20296/4/src/select.c">File src/select.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/libosmocore/+/20296/4/src/select.c@283">Patch Set #4, Line 283:</a> <code style="font-family:monospace,monospace">    log_target_file_switch_to_wqueue(osmo_stderr_target);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Fine with doing this by default, but it may make sense to have a VTY command to set a flag to avoid doing this here, or calling it explicitly if it's explicitly enabled in VTY.<br>This way you can control this regardless of use of osmo_select_main while still allowing for default sane options.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/20296">change 20296</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/c/libosmocore/+/20296"/><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-Change-Id: Ia58fd78535c41b3da3aeb7733aadc785ace610da </div>
<div style="display:none"> Gerrit-Change-Number: 20296 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 27 Sep 2020 11:52:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>