dart_syslog 0.1.0 dart_syslog: ^0.1.0 copied to clipboard
A syslog protocol (RFC 3164/RFC 5424) implementation that only supports UDP transport.
dart_syslog #
A syslog protocol (RFC 3164/RFC 5424) implementation that only supports UDP transport.
Features #
Usage #
The following sample illustrates a program that sends syslog message to the server that runs on 192.168.10.222:5140
:
import 'dart:io';
import 'package:syslog/syslog.dart';
void main() async {
final syslog = SyslogUdpClient(
address: InternetAddress.tryParse('192.168.10.222')!,
port: 5140,
tags: SyslogTags(
hostName: 'myhost',
appName: 'hello_syslog',
procId: pid.toString(),
),
);
await syslog.send(facility: Facility.local0, Severity.debug, 'Hello, world!');
}