[go: up one dir, main page]

sloggers 2.2.0

This library provides frequently used slog loggers and convenient functions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![cfg(not(unix))]

use serde::{de::Error, Deserialize, Deserializer, Serialize};

/// Fake syslog configuration type, for platforms where syslog is not
/// supported. Cannot be constructed.
#[derive(Clone, Debug, Serialize)]
pub enum SyslogNotSupported {}

impl<'de> Deserialize<'de> for SyslogNotSupported {
    fn deserialize<D: Deserializer<'de>>(_: D) -> Result<Self, D::Error> {
        Err(D::Error::custom("syslog is not supported on this platform"))
    }
}