SyslogUdpClient class
A syslog protocol (RFC 3164/RFC 5424) implementation that only supports UDP transport.
Constructors
- SyslogUdpClient({required InternetAddress address, int port = 514, SyslogTags? tags, bool useRfc5424 = false})
- Create a new syslog client. It should be closed by calling close.
Properties
- address → InternetAddress
-
syslog server address.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- port → int
-
syslog server port (The default is 514).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Tag values for messages.
final
- useRfc5424 → bool
-
Whether to use RFC-5424 or not. By default, it is false and uses RFC 3164.
final
Methods
-
close(
) → void - Close the socket if opened.
-
init(
) → Future< void> - Explicitly initialize the socket; normally you don't have to call it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
Severity severity, String message, {Facility? facility, int? facilityInt, DateTime? timeStamp, SyslogTags? tags, String? msgId, String? structuredData}) → Future< void> -
Send
message
withseverity
andfacility
orfacilityInt
(for custom facility) to the syslog server.tags
can be used to override the values passed to SyslogUdpClient constructor. IfmsgId
orstructuredData
are used, the message is sent using RFC 5424. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited