MiniLogger.st
changeset 20733 3a3d8e7e94fd
parent 20732 8407d1b888f3
child 20848 4144a9f43969
equal deleted inserted replaced
20732:8407d1b888f3 20733:3a3d8e7e94fd
    48 documentation
    48 documentation
    49 "   
    49 "   
    50     A very simple logger for Smalltalk/X. This one is always present.
    50     A very simple logger for Smalltalk/X. This one is always present.
    51     It mimics the protocol of the loggers found in stx:goodies/loggia,
    51     It mimics the protocol of the loggers found in stx:goodies/loggia,
    52     which can be activated by setting the global 'Logger' to an instance of
    52     which can be activated by setting the global 'Logger' to an instance of
    53     on of them.
    53     one of them.
    54     
    54     
    55     All 
    55     All 
    56         `Transcript show: 'Processor [info]: xxx' 
    56         `Transcript show: 'Processor [info]: xxx' 
    57     should be rewritten over time to use the Logger.
    57     should be rewritten over time to use the Logger.
    58 
    58 
    59     'Object infoPrint' and 'Object debugPrint' have been changed to
    59     'Object infoPrint' and 'Object debugPrint' have been changed to
    60     forward their message to the global 'Logger' unless nil.
    60     forward their message to the global 'Logger' if not nil.
    61     
    61     
    62     Usage:
    62     Usage:
    63         Logger info: 'Hello world'.
    63         Logger info: 'Hello world'.
    64         Logger debug: 'Hello world'.
    64         Logger debug: 'Hello world'.
    65         Logger warning: 'Hello world'.
    65         Logger warning: 'Hello world'.
    66         Logger error: 'Hello world'.
    66         Logger error: 'Hello world'.
    67 
    67 
    68     to disable logging:
    68     to disable logging:
    69         MiniLogger logOnTranscript:false.
    69         MiniLogger logOnTranscript:false.
    70         MiniLogger logOnStderr:false.
    70         MiniLogger logOnStderr:false.
    71         
    71 
       
    72     for selective logging:
       
    73         Logger loggingThreshold: Logger severityALL.
       
    74         Logger loggingThreshold: Logger severityINFO.
       
    75         Logger loggingThreshold: Logger severityNONE.
       
    76     
    72     For more examples, see #examples.
    77     For more examples, see #examples.
    73 
    78 
    74     [author:]
    79     [author:]
    75         Jan Vrany <jan.vrany@fit.cvut.cz>
    80         Jan Vrany <jan.vrany@fit.cvut.cz>
    76 
    81