mirror of
https://github.com/gechandesu/syslog.git
synced 2026-01-23 15:24:14 +03:00
init
This commit is contained in:
12
examples/log.v
Normal file
12
examples/log.v
Normal file
@@ -0,0 +1,12 @@
|
||||
import syslog
|
||||
|
||||
fn main() {
|
||||
mut log := syslog.open(ident: 'helloworld')
|
||||
defer {
|
||||
log.close()
|
||||
}
|
||||
log.send(.info, 'hello from V!')
|
||||
log.send(.err, 'error message from V!')
|
||||
|
||||
eprintln('On Linux run `journalctl -t helloworld` to see the result.')
|
||||
}
|
||||
Reference in New Issue
Block a user