Logger

Struct Logger 

Source
#[non_exhaustive]
pub struct Logger {
Show 17 fields pub device: Option<Box<Device>>, pub event_uid: Option<String>, pub is_truncated: Option<bool>, pub log_format: Option<String>, pub log_level: Option<String>, pub log_name: Option<String>, pub log_provider: Option<String>, pub log_version: Option<String>, pub logged_time: Option<i64>, pub logged_time_dt: Option<String>, pub name: Option<String>, pub product: Option<Box<Product>>, pub transmit_time: Option<i64>, pub transmit_time_dt: Option<String>, pub uid: Option<String>, pub untruncated_size: Option<i64>, pub version: Option<String>,
}
Expand description

Logger

The Logger object represents the device and product where events are stored with times for receipt and transmission. This may be at the source device where the event occurred, a remote scanning device, intermediate hops, or the ultimate destination.

[] Category: | Name: logger

Constraints:

  • at_least_one: [name,uid]

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§device: Option<Box<Device>>

Device

The device where the events are logged.

recommended

§event_uid: Option<String>

Event UID

The unique identifier of the event assigned by the logger.

optional

§is_truncated: Option<bool>

Is Truncated

Indicates whether the OCSF event data has been truncated due to size limitations. When true, some event data may have been omitted to fit within system constraints.

optional

§log_format: Option<String>

Log Format

The format of data in the log. For example JSON, syslog or CSV.

optional

§log_level: Option<String>

Log Level

The level at which an event was logged. This can be log provider specific. For example the audit level.

optional

§log_name: Option<String>

Log Name

The log name for the logging provider log, or the file name of the system log. This may be an intermediate store-and-forward log or a vendor destination log. For example /archive/server1/var/log/messages.0 or /var/log/.

recommended

§log_provider: Option<String>

Log Provider

The logging provider or logging service that logged the event. This may be an intermediate application store-and-forward log or a vendor destination log.

recommended

§log_version: Option<String>

Log Version

The event log schema version of the original event. For example the syslog version or the Cisco Log Schema version

optional

§logged_time: Option<i64>

Logged Time

The time when the logging system collected and logged the event.

This attribute is distinct from the event time in that event time typically contain the time extracted from the original event. Most of the time, these two times will be different.

recommended

§logged_time_dt: Option<String>

Logged Time

The time when the logging system collected and logged the event.

This attribute is distinct from the event time in that event time typically contain the time extracted from the original event. Most of the time, these two times will be different.

optional

§name: Option<String>

Name

The name of the logging product instance.

recommended

§product: Option<Box<Product>>

Product

The product logging the event. This may be the event source product, a management server product, a scanning product, a SIEM, etc.

recommended

§transmit_time: Option<i64>

Transmission Time

The time when the event was transmitted from the logging device to it’s next destination.

recommended

§transmit_time_dt: Option<String>

Transmission Time

The time when the event was transmitted from the logging device to it’s next destination.

optional

§uid: Option<String>

Unique ID

The unique identifier of the logging product instance.

recommended

§untruncated_size: Option<i64>

Untruncated Size

The original size of the OCSF event data in kilobytes before any truncation occurred. This field is typically populated when is_truncated is true to indicate the full size of the original event.

optional

§version: Option<String>

Version

The version of the logging provider.

optional

Trait Implementations§

Source§

impl Clone for Logger

Source§

fn clone(&self) -> Logger

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Logger

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Logger

Source§

fn default() -> Logger

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Logger
where Logger: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Logger

Source§

fn eq(&self, other: &Logger) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Logger

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Logger

Auto Trait Implementations§

§

impl Freeze for Logger

§

impl RefUnwindSafe for Logger

§

impl Send for Logger

§

impl Sync for Logger

§

impl Unpin for Logger

§

impl UnwindSafe for Logger

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,