eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UnixSyslogInterface':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: UnixSyslogInterface


Inheritance:

   Object
   |
   +--MiniLogger
      |
      +--UnixSyslogInterface

Package:
stx:libbasic
Category:
System-Debugging-Support
Version:
rev: 1.9 date: 2019/05/22 17:35:32
user: cg
file: UnixSyslogInterface.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Stefan Vogel

Description:


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.


Related information:

    MiniLogger

Class protocol:

accessing
o  defaultSyslogFacility

o  defaultSyslogFacility: anInteger
set the default facility of syslog (e.g. self LOG_LOCAL0).
This is different from the Logger facility arg.

accessing-facilities
o  LOG_AUTH

o  LOG_AUTHPRIV

o  LOG_CRON

o  LOG_DAEMON

o  LOG_FTP

o  LOG_KERN

o  LOG_LOCAL0

o  LOG_LOCAL1

o  LOG_LOCAL2

o  LOG_LOCAL3

o  LOG_LOCAL4

o  LOG_LOCAL5

o  LOG_LOCAL6

o  LOG_LOCAL7

o  LOG_LPR

o  LOG_MAIL

o  LOG_NEWS

o  LOG_SYSLOG

o  LOG_USER

o  LOG_UUCP

accessing-options
o  LOG_CONS

o  LOG_NDELAY

o  LOG_ODELAY

o  LOG_PERROR

o  LOG_PID

accessing-priorities
o  LOG_ALERT

o  LOG_CRIT

o  LOG_DEBUG

o  LOG_EMERG

o  LOG_ERR

o  LOG_INFO

o  LOG_NOTICE

o  LOG_WARNING

api
o  apiSyslog: priority format: format message: message
self openlog:'stx2' option:0 facility:self LOG_LOCAL7.
self syslog:self LOG_WARNING message:'stx %% demo'.
self closelog.

o  closelog

o  libraryName

o  openlog: ident option: option facility: facility
self new openlog:'stx' option:0 facility:0.
self new closelog.

initialization
o  initialize
Priorities

logging
o  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
o  basicLog: message severity: severity facility: facility originator: originator attachment: attachment
with:'' "/ severity name

queries
o  canLog
(comment from inherited method)
answer true, if logging can be performed. Subclasse may redefine this.


Examples:


    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.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 07 Oct 2022 18:36:14 GMT