MiniLogger.st
changeset 22710 731015dd01c5
parent 22505 a85d5e597dd0
child 23109 c8ec00051542
equal deleted inserted replaced
22709:ac3bd46e88b9 22710:731015dd01c5
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 2012-2014 by Jan Vrany & eXept Software AG
     4  COPYRIGHT (c) 2012-2014 by Jan Vrany & eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   351 ! !
   353 ! !
   352 
   354 
   353 !MiniLogger class methodsFor:'configuration'!
   355 !MiniLogger class methodsFor:'configuration'!
   354 
   356 
   355 loggingThreshold
   357 loggingThreshold
   356     "Return the logging threshold. No messages with severity lower than 
   358     "Return the logging threshold. 
   357      threshold will be logged."
   359      No messages with severity lower than threshold will be logged.
       
   360      The default is 
       
   361         InfoPrinting ifTrue:[INFO] ifFalse:[WARN]
       
   362      meaning that by default, no trace and debug logs are generated."
   358     
   363     
   359     ^ Threshold
   364     ^ Threshold
       
   365 
       
   366     "
       
   367      self loggingThreshold:INFO.
       
   368      self trace:'blabla'.
       
   369      self loggingThreshold:TRACE.
       
   370      self trace:'blabla'.
       
   371      self loggingThreshold:INFO.
       
   372     "
   360 
   373 
   361     "Created: / 13-08-2014 / 14:36:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   374     "Created: / 13-08-2014 / 14:36:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   362 !
   375 !
   363 
   376 
   364 loggingThreshold:severity 
   377 loggingThreshold:severity 
  1246      'hello' infoPrintCR.
  1259      'hello' infoPrintCR.
  1247 
  1260 
  1248      Logger log:'test message' severity: DEBUG facility: 'TEST'
  1261      Logger log:'test message' severity: DEBUG facility: 'TEST'
  1249      Logger log:'test message' severity: INFO facility: 'TEST'
  1262      Logger log:'test message' severity: INFO facility: 'TEST'
  1250      Logger log:'test message' asUnicode16String severity: INFO facility: 'TEST'
  1263      Logger log:'test message' asUnicode16String severity: INFO facility: 'TEST'
  1251      Logger log:'test message äöüß' severity: INFO facility: 'TEST'
  1264      Logger log:'test message äöüß' severity: INFO facility: 'TEST'
  1252      Logger log:'test message' severity: WARNING facility: 'TEST'
  1265      Logger log:'test message' severity: WARNING facility: 'TEST'
  1253      Logger log:'test message' severity: ERROR facility: 'TEST'
  1266      Logger log:'test message' severity: ERROR facility: 'TEST'
  1254      'test message' infoPrintCR
  1267      'test message' infoPrintCR
  1255      'test message' errorPrintCR
  1268      'test message' errorPrintCR
  1256     "
  1269     "