Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework using the POSIX syslog API #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jun 19, 2020

  1. Rework using the POSIX syslog API. This is a breaking change.

    As discussed in PR slog-rs#5, this is based on the [syslog backend that I wrote for sloggers][1] and does not use the `syslog` crate. It is now very different from both slog-syslog 0.12 and PR slog-rs#5. Differences from slog-rs#5 include:
    
    * Uses the POSIX syslog API through the `libc` crate. (See “design and rationale” in src/lib.rs, starting at line 52, for details.) This means:
    * Only works on Unix-like platforms.
    * Only sends log messages to the local syslog daemon, not to a remote server.
    * Formats log messages into a reusable thread-local buffer, as in slog-syslog 0.12.
    * The `Drain` implementation is now called `SyslogDrain` instead of `Streamer3164`, since local syslog doesn't use the RFC3164 protocol.
    * If the `serde` feature is enabled, logging settings can be loaded from a configuration file.
    
    Minimum supported Rust version is 1.27.2, or if the `serde` feature is enabled, 1.31.0. Doc-tests require 1.28.0. Works (except doc-tests) on 1.26.2 if you run the following commands first:
    
    ```
    cargo generate-lockfile
    cargo update --package lazy_static --precise 1.3.0
    cargo update --package serde --precise 1.0.58
    cargo update --package serde_derive --precise 1.0.58
    ```
    
    [1]: sile/sloggers#34
    argv-minus-one committed Jun 19, 2020
    Configuration menu
    Copy the full SHA
    63294d3 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2020

  1. Additional configuration option log_priority to log all messages with…

    … a given syslog priority
    Aron Wieck authored and Aron Wieck committed Aug 3, 2020
    Configuration menu
    Copy the full SHA
    dee8f6f View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2020

  1. Rename MsgFormat to Adapter. Allow control of syslog priorities o…

    …n a per-message basis.
    
    Thanks to @eun-ice for the idea and initial implementation.
    argv-minus-one committed Aug 5, 2020
    Configuration menu
    Copy the full SHA
    4270074 View commit details
    Browse the repository at this point in the history