Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: prognant <[email protected]>
  • Loading branch information
prognant committed Apr 26, 2021
1 parent 9d3b01a commit 5e107b4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/sinks/syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
use crate::sinks::util::unix::UnixSinkConfig;
use crate::{
config::{log_schema, DataType, GenerateConfig, SinkConfig, SinkContext, SinkDescription},
event::LogEvent,
event::Value,
event::{Event,LogEvent,Value},
sinks::util::{tcp::TcpSinkConfig, udp::UdpSinkConfig},
Event,
};
use bytes::Bytes;
use chrono::{FixedOffset, TimeZone};
use serde::{Deserialize, Serialize};
use syslog_loose::{Message, ProcId, Protocol, StructuredElement, SyslogFacility, SyslogSeverity};

//#[derive(Derivative, Copy, Clone, Debug, Deserialize, Serialize, PartialEq)]
#[derive(Derivative, Clone, Copy, Debug, Deserialize, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum Format {
Expand Down Expand Up @@ -340,7 +337,7 @@ fn get_severity(value: Value) -> Option<SyslogSeverity> {
}
}

/// Syslog Severities from RFC 5424.
// Syslog Severities from RFC 5424.
#[derive(Serialize, Deserialize)]
#[serde(remote = "SyslogSeverity")]
#[allow(non_camel_case_types)]
Expand All @@ -355,7 +352,7 @@ pub enum SyslogSeverityDef {
SEV_DEBUG = 7,
}

/// Names are from Linux.
// Names are from Linux.
#[derive(Serialize, Deserialize)]
#[serde(remote = "SyslogFacility")]
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -389,7 +386,7 @@ pub enum SyslogFacilityDef {
#[cfg(test)]
mod tests {
use super::*;
use crate::Event;
use crate::event::Event;
use chrono::Utc;

#[test]
Expand Down

0 comments on commit 5e107b4

Please sign in to comment.