[4110] in BarnOwl Developers

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

[barnowl/barnowl] e47e1b: Display log file name on failure to open

daemon@ATHENA.MIT.EDU (GitHub)
Sat Aug 5 23:22:00 2017

Date: Sat, 05 Aug 2017 20:21:55 -0700
From: GitHub <noreply@github.com>
Reply-To: GitHub <noreply@github.com>
To: barnowl-dev@mit.edu


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

  Branch: refs/heads/master
  Home:   https://github.com/barnowl/barnowl
  Commit: e47e1b07998af0a22ca6c714e7f185e411502901
      https://github.com/barnowl/barnowl/commit/e47e1b07998af0a22ca6c714e7f185e411502901
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Display log file name on failure to open file

Also, make owl_log_error be like printf.  This will be more useful in
the next commit, when we display error codes.


  Commit: ec362473f03db84232708e997087bfab74d6d937
      https://github.com/barnowl/barnowl/commit/ec362473f03db84232708e997087bfab74d6d937
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M commands.c
    M logging.c

  Log Message:
  -----------
  Defer failed log messages

Previously, when we failed to open a logging file, we errored, and
dropped the log message.  This commit makes it so that, if the reason we
failed was a permissions error, we instead add the log entry to a queue
of messages to be logged eventually, and inform the user that logging
has been suspended.  The user must run :flush-logs to resume logging.

If :flush-log has an fopen that fails with EPERM or EACCES, we re-defer
messages and inform the user.

On shutdown, BarnOwl will attempt to log all messages currently in the
queue one last time.


  Commit: 77beb3c6840173de52cb309bd16ee84fcb5b550d
      https://github.com/barnowl/barnowl/commit/77beb3c6840173de52cb309bd16ee84fcb5b550d
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M commands.c
    M logging.c

  Log Message:
  -----------
  Add a -f flag to :flush-logs

This allows us to bypass any troublesome messages in the queue.


  Commit: e6f21ead408037fd0a7ef5e3cf9015d2a29a2f39
      https://github.com/barnowl/barnowl/commit/e6f21ead408037fd0a7ef5e3cf9015d2a29a2f39
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Add ETIMEDOUT to the list of errors for defer_logs

This is for AFS blips


  Commit: 9d6e37cb58434e4fbf02a1795f74261a3be2a227
      https://github.com/barnowl/barnowl/commit/9d6e37cb58434e4fbf02a1795f74261a3be2a227
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M perl/Makefile.am
    M perl/lib/BarnOwl.pm
    A perl/lib/BarnOwl/DeferredLogging.pm

  Log Message:
  -----------
  Add a variable to auto-flush logs every n minutes


  Commit: edb14cc42920b852b692bf06be2b12ca084155f7
      https://github.com/barnowl/barnowl/commit/edb14cc42920b852b692bf06be2b12ca084155f7
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Let the user know when the logs have been flushed

I've found it a bit disconcerting to have no feedback on whether or not
:flush-logs has succeeded, and on whether or not we're still in deferred
logging mode.  Perhaps a message (owl_function_makemsg with no newline)
would be better than adminmsg here, but I'm not sure.


  Commit: 874fd1972963926883e2b55dde69cb567b3acb78
      https://github.com/barnowl/barnowl/commit/874fd1972963926883e2b55dde69cb567b3acb78
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Fix the sense of drop_failed_logs

Previously, :flush-logs was dropping failed logs, while :flush-logs -f
was not.  Additionally, :flush-logs -f was enqueing the failed messages
at the end of the queue, breaking message ordering.

This commit fixes both of these issues.  I chose to optimize for the
case where :flush-logs is run without renewing tickets (where the
correct behavior is to stop at the first message that fails), rather
than the case where the user is logging to a directory they never have
permission to access (where the correct behavior is to try to log all of
the messages, and keep only the ones that fail).  This way, we won't
ever flood the system with lots of requests for files we don't have
permissions to access, and the user will have to :flush-logs -f if they
log to a directory they don't have permission to write to.


  Commit: 1917e53aab60766331084ae229ab9268d3cd1f0a
      https://github.com/barnowl/barnowl/commit/1917e53aab60766331084ae229ab9268d3cd1f0a
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Don't say that logging has resumed if it hasn't


  Commit: 604303cc0a7bd1f4171ff535529f101e4b87da17
      https://github.com/barnowl/barnowl/commit/604303cc0a7bd1f4171ff535529f101e4b87da17
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Give a bit more feedback when flushing logs

It's a bit hard to tell what's happening when :flush-logs gives no
feedback (though I think frequently the issue is that it just takes a
long time to write to disk).  This change displays how many logs there
are to be flushed, when the flushing fails.


  Commit: e38f3156f67887ddaff06702b734d7a23fec094e
      https://github.com/barnowl/barnowl/commit/e38f3156f67887ddaff06702b734d7a23fec094e
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  logging.c: Make bool defer_logs static

It's not used outside the file, so we might as well make it static.


  Commit: 89e4294f976b77c9bf3be81e68c0e4c82a72f177
      https://github.com/barnowl/barnowl/commit/89e4294f976b77c9bf3be81e68c0e4c82a72f177
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Add comments to logging.c

We note that defer_logs is only accessed on the disk-writing thread.


  Commit: 565a43ce7de0c6003ae7ecb8e0600dde1d9cf798
      https://github.com/barnowl/barnowl/commit/565a43ce7de0c6003ae7ecb8e0600dde1d9cf798
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Print a message about how many logs are flushed


  Commit: 4511ac3c20a12d2a121c8dce66a23cf532004529
      https://github.com/barnowl/barnowl/commit/4511ac3c20a12d2a121c8dce66a23cf532004529
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M commands.c
    M logging.c
    M perl/lib/BarnOwl/DeferredLogging.pm

  Log Message:
  -----------
  Better UI for :flush-logs and flush-logs-interval

We now only print the message about how many logs there are to flush
when -q is not passed to :flush-logs.  The timer from
flush-logs-interval passes -q, so the user won't see "There are no logs
to flush." ever few minutes.


  Commit: 253f37fc45fef88a2a4f88f5167facb9323ca591
      https://github.com/barnowl/barnowl/commit/253f37fc45fef88a2a4f88f5167facb9323ca591
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Change int ret to int errnum as per PR review

As per https://github.com/barnowl/barnowl/pull/109#discussion_r131532257


  Commit: 8a06468cac5224cf5b4d868473da644e56086617
      https://github.com/barnowl/barnowl/commit/8a06468cac5224cf5b4d868473da644e56086617
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M logging.c

  Log Message:
  -----------
  Clarify a comment about deferred logging mode

As per https://github.com/barnowl/barnowl/pull/109#discussion_r131532293


  Commit: 958752c677c3af641e55c6e1c6092bef615d790f
      https://github.com/barnowl/barnowl/commit/958752c677c3af641e55c6e1c6092bef615d790f
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M perl/lib/BarnOwl/DeferredLogging.pm

  Log Message:
  -----------
  Set default deferred logging interval to 1 hour


  Commit: 0d2c3583d7e7c8e0307086c8409fca07c71d981e
      https://github.com/barnowl/barnowl/commit/0d2c3583d7e7c8e0307086c8409fca07c71d981e
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M perl/lib/BarnOwl/DeferredLogging.pm

  Log Message:
  -----------
  Remove a useless 0 + perl cast


  Commit: 4bbe53ad1bf2d8593ccb736f63b15fe71f53e583
      https://github.com/barnowl/barnowl/commit/4bbe53ad1bf2d8593ccb736f63b15fe71f53e583
  Author: Jason Gross <jgross@mit.edu>
  Date:   2017-08-05 (Sat, 05 Aug 2017)

  Changed paths:
    M perl/lib/BarnOwl/DeferredLogging.pm

  Log Message:
  -----------
  Add a comment for documentation

As per https://github.com/barnowl/barnowl/pull/109#discussion_r131532750


Compare: https://github.com/barnowl/barnowl/compare/8eb72d27696d...4bbe53ad1bf2
----==_mimepart_59868b53253c8_44c53f874073fc24983bf--

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