MiniLogger.st
changeset 20610 37a18361b46b
parent 20529 e026fd505d16
child 20617 b5a014b5ebd7
equal deleted inserted replaced
20609:1b423e40ed09 20610:37a18361b46b
   875             messageProperlyEncoded := message utf8Encoded.
   875             messageProperlyEncoded := message utf8Encoded.
   876         ] ifFalse:[
   876         ] ifFalse:[
   877             messageProperlyEncoded := OperatingSystem encodePath: message.
   877             messageProperlyEncoded := OperatingSystem encodePath: message.
   878         ]
   878         ]
   879     ].
   879     ].
   880     messageProperlyEncoded := messageProperlyEncoded withoutSeparators.
   880     "/ messageProperlyEncoded := messageProperlyEncoded withoutSeparators.
   881 
   881 
   882     "/ hack to allow calls from infPrint/errorPrint.
   882     "/ hack to allow calls from infPrint/errorPrint.
   883     "/ if this is an oldStyle infoPrint or errorPrint, do not append another facility and severity
   883     "/ if this is an oldStyle infoPrint or errorPrint, do not append another facility and severity
   884     words := message asCollectionOfWords.
   884     words := message asCollectionOfWords.
   885     (words size > 2
   885     (words size >= 2
   886     and:[ words first isAlphaNumeric
   886     and:[ words first isAlphaNumeric
   887     and:[(words second startsWith:$[ )
   887     and:[(words second startsWith:$[ )
   888     and:[(words second endsWith:$] ) or:[(words second endsWith:']:' )]]]]) ifTrue:[
   888     and:[(words second endsWith:$] ) or:[(words second endsWith:']:' )]]]]) ifTrue:[
   889         facility := words first.
   889         facility := words first.
   890         severityName := words second copyButFirst.
   890         severityName := words second copyButFirst.
   891         severityName := severityName copyTo:(severityName indexOf:$])-1.
   891         severityName := severityName copyTo:(severityName indexOf:$])-1.
   892         messageProperlyEncoded := messageProperlyEncoded copyFrom:(messageProperlyEncoded indexOf:$])+1.
   892         messageProperlyEncoded := messageProperlyEncoded copyFrom:(messageProperlyEncoded indexOf:$])+1.
   893         messageProperlyEncoded := messageProperlyEncoded withoutSeparators.
   893         "/ messageProperlyEncoded := messageProperlyEncoded withoutSeparators.
   894         (messageProperlyEncoded startsWith:$:) ifTrue:[
   894         (messageProperlyEncoded startsWith:$:) ifTrue:[
   895             messageProperlyEncoded := (messageProperlyEncoded copyFrom:2) withoutSeparators.
   895             messageProperlyEncoded := (messageProperlyEncoded copyFrom:2) "/ withoutSeparators.
   896         ].
   896         ].
   897     ].
   897     ].
   898     messageAsSent := (self logFormat
   898     messageAsSent := (self logFormat
   899                 bindWith:(facility ? 'STX')
   899                 bindWith:(facility ? 'STX')
   900                 with:severityName
   900                 with:severityName