[dovecot/core] 521a9d: lib: Introduce abstraction for failure logging imp...

GitHub noreply at github.com
Fri Sep 7 11:00:14 EEST 2018


  Branch: refs/heads/master-2.3
  Home:   https://github.com/dovecot/core
  Commit: 521a9dbd0ec13664b6e91c89dad9df1445b74685
      https://github.com/dovecot/core/commit/521a9dbd0ec13664b6e91c89dad9df1445b74685
  Author: Sergey Kitov <sergey.kitov at open-xchange.com>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Introduce abstraction for failure logging implementations.


  Commit: baa175b7bfa36cc02a13d046d16453b38d14a352
      https://github.com/dovecot/core/commit/baa175b7bfa36cc02a13d046d16453b38d14a352
  Author: Sergey Kitov <sergey.kitov at open-xchange.com>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Implement vfuncs for logging to default location and common failure logging handling


  Commit: 4bea16a9b4c97942700ec60dd8ed4d0633884823
      https://github.com/dovecot/core/commit/4bea16a9b4c97942700ec60dd8ed4d0633884823
  Author: Sergey Kitov <sergey.kitov at open-xchange.com>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Implement vfuncs for logging to syslog


  Commit: 3fd0d3a87a8567b5270b4d92e9be2d954ca8f906
      https://github.com/dovecot/core/commit/3fd0d3a87a8567b5270b4d92e9be2d954ca8f906
  Author: Sergey Kitov <sergey.kitov at open-xchange.com>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Implement vfuncs for logging to stderr


  Commit: fe68833acb2095c48de8659f74f0087d3fd34d80
      https://github.com/dovecot/core/commit/fe68833acb2095c48de8659f74f0087d3fd34d80
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Rename handler_config variable to failure_handler

It's a global variable, so it needs to have a proper prefix.


  Commit: da355a28a0adc5c286175dcb43c9cb631ab16ce9
      https://github.com/dovecot/core/commit/da355a28a0adc5c286175dcb43c9cb631ab16ce9
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Make failure handler variables static


  Commit: 182bfc315651593ac1b970bfb8f0cd7b014bb94d
      https://github.com/dovecot/core/commit/182bfc315651593ac1b970bfb8f0cd7b014bb94d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/Makefile.am
    A src/lib/failures-private.h
    M src/lib/failures.c

  Log Message:
  -----------
  lib: Move failure handler structs and typedefs to failures-private.h

Also change the function typedefs to be non-pointers, like they usually are
in Dovecot code.


  Commit: 4e21dd19ef70c02d9a2212ecf568df13d26766e3
      https://github.com/dovecot/core/commit/4e21dd19ef70c02d9a2212ecf568df13d26766e3
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: failures - Move adding LF from default_format() to default_write()

This makes it similar to internal_format/write()


  Commit: 46cbad31add438afa4988d1892f46d403b039df6
      https://github.com/dovecot/core/commit/46cbad31add438afa4988d1892f46d403b039df6
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/Makefile.am
    A src/lib/test-event-log.c
    M src/lib/test-lib.inc

  Log Message:
  -----------
  lib: Add unit test for event log prefix handling

Some of the tests are commented out until they're fixed in a following
commit.


  Commit: f39897d772e8ce8552cb10a01bcfa5bca9cf025c
      https://github.com/dovecot/core/commit/f39897d772e8ce8552cb10a01bcfa5bca9cf025c
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c

  Log Message:
  -----------
  lib: failures - Use common log_prefix_add() for default and syslog formatters


  Commit: 801965494c4b3baf7d672347d330b23ce81e52ff
      https://github.com/dovecot/core/commit/801965494c4b3baf7d672347d330b23ce81e52ff
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/log/log-connection.c

  Log Message:
  -----------
  log: Avoid unnecessary global log prefix changes

If the context specifies a log prefix, the global prefix isn't going to be
used.


  Commit: 5fc5933a627743927b36008da2a8dad5918e21aa
      https://github.com/dovecot/core/commit/5fc5933a627743927b36008da2a8dad5918e21aa
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/log/log-connection.c

  Log Message:
  -----------
  log: Move data stack frame allocation to parent function

This simplifies the next commit, which requires data stack nearly always
when logging. The data stack frames are cheap enough that we don't really
need to optimize for avoiding the cases when they're not needed.


  Commit: 027a1b94cb9c8e096a15cfd1cc8b3c80b6a3aeea
      https://github.com/dovecot/core/commit/027a1b94cb9c8e096a15cfd1cc8b3c80b6a3aeea
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c
    M src/lib/failures.h
    M src/log/log-connection.c

  Log Message:
  -----------
  lib, log: Add log prefix length to internal logging protocol

This way log process knows which part of the text is the log prefix, and
which part is the logged text.


  Commit: f85e0e01ba49d1c970431f3468d5b615f6896883
      https://github.com/dovecot/core/commit/f85e0e01ba49d1c970431f3468d5b615f6896883
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/failures.c
    M src/lib/failures.h

  Log Message:
  -----------
  lib: Add failure_context.log_prefix_type_pos

If non-zero, this specifies where the log type (e.g. "Info: ") is written
within the log prefix. By default it's appended.


  Commit: cebd034a4faba97013502a5754a55e66d3b842cf
      https://github.com/dovecot/core/commit/cebd034a4faba97013502a5754a55e66d3b842cf
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2018-09-07 (Fri, 07 Sep 2018)

  Changed paths:
    M src/lib/event-log.c
    M src/lib/lib-event.h
    M src/lib/test-event-log.c

  Log Message:
  -----------
  lib: Move log type to be written before appended log prefix

This changes the logging format back to how it used to be before the event
logging changes.


Compare: https://github.com/dovecot/core/compare/bc2ea7e1184b...cebd034a4fab
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the dovecot-cvs mailing list