UnixSyslogInterface.st
changeset 23151 0f2ee2d56903
parent 23147 65239d39db15
child 23220 6b814a812eb4
equal deleted inserted replaced
23150:047b878c8123 23151:0f2ee2d56903
   358 basicLog:message severity:severity facility:facility originator:originator attachment:attachment
   358 basicLog:message severity:severity facility:facility originator:originator attachment:attachment
   359     |priority messageAsSent|
   359     |priority messageAsSent|
   360 
   360 
   361     priority := PriorityMapping at:severity ifAbsent:5.
   361     priority := PriorityMapping at:severity ifAbsent:5.
   362     messageAsSent := 
   362     messageAsSent := 
   363             '%1 %2: %3'
   363             '%1%2%3: %4'
   364                 bindWith:(facility ? 'STX')
   364                 bindWith:(facility ? 'STX')
   365 "/                with:'' "/ severity name
   365 "/                with:'' "/ severity name
   366 "/                with:'' "/ (Timestamp now printStringFormat:(self timestampFormat))
   366 "/                with:'' "/ (Timestamp now printStringFormat:(self timestampFormat))
       
   367                 with:(originator notEmptyOrNil ifTrue:'+' ifFalse:[''])
   367                 with:originator
   368                 with:originator
   368                 with:message.
   369                 with:message.
   369 
   370 
   370     messageAsSent := messageAsSent string.  "take care of Texts"
   371     messageAsSent := messageAsSent string.  "take care of Texts"
   371     messageAsSent containsNon7BitAscii ifTrue:[
   372     messageAsSent containsNon7BitAscii ifTrue:[
   379         self fatal:'%1 fatal demo (%2%)' with:'stx' with:16.
   380         self fatal:'%1 fatal demo (%2%)' with:'stx' with:16.
   380         self closelog.
   381         self closelog.
   381     "
   382     "
   382 
   383 
   383     "Created: / 28-06-2018 / 11:08:04 / Stefan Vogel"
   384     "Created: / 28-06-2018 / 11:08:04 / Stefan Vogel"
       
   385     "Modified: / 28-06-2018 / 15:01:25 / Stefan Vogel"
   384 ! !
   386 ! !
   385 
   387 
   386 !UnixSyslogInterface class methodsFor:'queries'!
   388 !UnixSyslogInterface class methodsFor:'queries'!
   387 
   389 
   388 canLog
   390 canLog