[4100] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [barnowl/barnowl] Defer failed log messages (#109)

daemon@ATHENA.MIT.EDU (Jason Gross)
Sat Aug 5 22:19:10 2017

Date: Sun, 06 Aug 2017 02:19:06 +0000 (UTC)
From: Jason Gross <notifications@github.com>
Reply-To: barnowl/barnowl <reply+004448c9e02df5bbce560807f1ea59b3de7674a85836e53e92cf00000001159e3e9a92a169ce009427d1@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
In-Reply-To: <barnowl/barnowl/pull/109@github.com>

----==_mimepart_59867c9a4c89b_2ad33fc285aefc2c705a5
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

JasonGross commented on this pull request.



> +      /* Attempt to write the log entry.  If it fails, re-queue the entry at
+       * the head of the queue. */
+      owl_log_eventually_write_entry(entry);
+    } else {
+      /* Attempt to write the log entry. If it fails, print an error message,
+       * drop the log, and keep going through the queue. */
+      ret = owl_log_try_write_entry(entry);
+      if (ret != 0) {
+        all_succeeded = false;
+        owl_log_file_error(entry, ret);
+      }
+    }
+    owl_log_entry_free(entry);
+  }
+  if (all_succeeded && logged_message_count > 0 && !defer_logs) {
+    owl_log_adminmsg("Logs have been flushed and logging has resumed.");

Done

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/109#discussion_r131533135
----==_mimepart_59867c9a4c89b_2ad33fc285aefc2c705a5
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p><b>@JasonGross</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/barnowl/barnowl/pull/109#discussion_r131533135">logging.c</a>:</p>
<pre style='color:#555'>&gt; +      /* Attempt to write the log entry.  If it fails, re-queue the entry at
+       * the head of the queue. */
+      owl_log_eventually_write_entry(entry);
+    } else {
+      /* Attempt to write the log entry. If it fails, print an error message,
+       * drop the log, and keep going through the queue. */
+      ret = owl_log_try_write_entry(entry);
+      if (ret != 0) {
+        all_succeeded = false;
+        owl_log_file_error(entry, ret);
+      }
+    }
+    owl_log_entry_free(entry);
+  }
+  if (all_succeeded &amp;&amp; logged_message_count &gt; 0 &amp;&amp; !defer_logs) {
+    owl_log_adminmsg(&quot;Logs have been flushed and logging has resumed.&quot;);
</pre>
<p>Done</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/barnowl/barnowl/pull/109#discussion_r131533135">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AERIyUwb9YkNFmFWFXzbqWfJ9TH03s_Hks5sVSKagaJpZM4AWArI">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AERIyVT8EZ5-JQR1o5zMrDhe0xt4Q54sks5sVSKagaJpZM4AWArI.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/barnowl/barnowl/pull/109#discussion_r131533135"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/barnowl/barnowl","title":"barnowl/barnowl","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/barnowl/barnowl"}},"updates":{"snippets":[{"icon":"PERSON","message":"@JasonGross commented on #109"}],"action":{"name":"View Pull Request","url":"https://github.com/barnowl/barnowl/pull/109#discussion_r131533135"}}}</script>
----==_mimepart_59867c9a4c89b_2ad33fc285aefc2c705a5--

home help back first fref pref prev next nref lref last post