pub struct LogOptions {
pub batch: BatchOptions,
pub resource: Attributes,
pub redaction: Option<RedactionProcessor>,
pub min_severity: Severity,
pub protocol: Option<GelfProtocol>,
pub host: Option<String>,
pub transport: Option<Arc<dyn GelfTransport>>,
pub transport_options: GelfTransportOptions,
pub bearer_token: Option<Secret>,
}Expand description
Options of GraylogClient::new_log_client: the batching options plus the transport choice.
Fields§
§batch: BatchOptionsBatch settings.
resource: AttributesResource attributes merged into every record (record keys win): service.name,
service.version, deployment.environment, host.name.
redaction: Option<RedactionProcessor>Redaction applied before records leave the process (default
RedactionProcessor::default); None disables it.
min_severity: SeverityMinimum severity of loggers made by LogClient::logger (default Info).
protocol: Option<GelfProtocol>udp, tcp, http or otlp (None = the configured GELF protocol).
host: Option<String>GELF host of records without resource["host.name"] (default: the local host name).
transport: Option<Arc<dyn GelfTransport>>Used instead of building a transport (closed with the log client).
transport_options: GelfTransportOptionsUDP, HTTP and header settings of the built transport.
bearer_token: Option<Secret>OTLP: the input’s bearer token.
Implementations§
Source§impl LogOptions
impl LogOptions
Sourcepub fn resource_attribute(
self,
key: impl Into<String>,
value: impl Into<AttrValue>,
) -> Self
pub fn resource_attribute( self, key: impl Into<String>, value: impl Into<AttrValue>, ) -> Self
Adds one resource attribute.
Sourcepub fn batch(self, batch: BatchOptions) -> Self
pub fn batch(self, batch: BatchOptions) -> Self
Sets the batch options.
Sourcepub fn protocol(self, protocol: GelfProtocol) -> Self
pub fn protocol(self, protocol: GelfProtocol) -> Self
Sets the protocol.