|
Class: UnixSyslogInterface
Object
|
+--MiniLogger
|
+--UnixSyslogInterface
- Package:
- stx:libbasic
- Category:
- System-Debugging-Support
- Version:
- rev:
1.12
date: 2023/09/14 10:50:42
- user: stefan
- file: UnixSyslogInterface.st directory: libbasic
- module: stx stc-classLibrary: libbasic
This logger logs messages via the Unix/Linux syslog system call
(so it is not available in Windows).
It uses any log method implemented in the syslog system call, e.g.
logging via network.
[class variables:]
DefaultSyslogFacility Integer the default facility of syslog (e.g. self LOG_LOCAL0).
This is different from the Logger facility arg.
copyrightCOPYRIGHT (c) 2018 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
defaultSyslogFacility
-
-
defaultSyslogFacility: anInteger
-
set the default facility of syslog (e.g. self LOG_LOCAL0).
This is different from the Logger facility arg.
accessing-facilities
-
LOG_AUTH
-
-
LOG_AUTHPRIV
-
-
LOG_CRON
-
-
LOG_DAEMON
-
-
LOG_FTP
-
-
LOG_KERN
-
-
LOG_LOCAL0
-
-
LOG_LOCAL1
-
-
LOG_LOCAL2
-
-
LOG_LOCAL3
-
-
LOG_LOCAL4
-
-
LOG_LOCAL5
-
-
LOG_LOCAL6
-
-
LOG_LOCAL7
-
-
LOG_LPR
-
-
LOG_MAIL
-
-
LOG_NEWS
-
-
LOG_SYSLOG
-
-
LOG_USER
-
-
LOG_UUCP
-
accessing-options
-
LOG_CONS
-
-
LOG_NDELAY
-
-
LOG_ODELAY
-
-
LOG_PERROR
-
-
LOG_PID
-
accessing-priorities
-
LOG_ALERT
-
-
LOG_CRIT
-
-
LOG_DEBUG
-
-
LOG_EMERG
-
-
LOG_ERR
-
-
LOG_INFO
-
-
LOG_NOTICE
-
-
LOG_WARNING
-
api
-
apiSyslog: priority format: format message: message
-
self openlog:'stx2' option:0 facility:self LOG_LOCAL7.
self apiSyslog:self LOG_WARNING format:'%s' message:'stx %% demo'.
self closelog.
-
closelog
-
-
libraryName
-
-
openlog: ident option: option facility: facility
-
self new openlog:'stx' option:0 facility:0.
self new closelog.
initialization
-
initialize
-
Priorities: map Logger priorities to syslog priorities
logging
-
syslog: priority message: message arguments: argArray
-
self openlog:'stx' option:0 facility:self LOG_USER.
self syslog:self LOG_WARNING message:'%1 demo (%2%)' arguments:#('stx' 16).
self closelog.
private
-
basicLog: message severity: severity facility: facility originator: originator attachment: attachment
-
with:'' "/ severity name
queries
-
canLog
-
(comment from inherited method)
answer true, if logging is to be performed.
Subclasse may redefine this.
Logger := self.
self info:'%1 info demo » (%2%)' with:'stx' with:16.
self warning:'%1 warning demo (%2%)' with:'stx' with:16.
self error:'%1 error demo (%2%)' with:'stx' with:16.
self fatal:'%1 fatal demo (%2%)' with:'stx' with:16.
Logger := MiniLogger.
|
self openlog:'stx' option:0 facility:self LOG_USER.
self syslog:self LOG_WARNING message:'%1 demo (%2%)' arguments:#('stx' 16).
self closelog.
|
|