MiniLogger.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 24260 39bb70df6450
child 24508 0b2cc77b316f
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
     1
"{ Encoding: utf8 }"
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
     2
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
     3
"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
     4
 COPYRIGHT (c) 2012-2014 by Jan Vrany & eXept Software AG
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
     5
              All Rights Reserved
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
     6
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
     7
 This software is furnished under a license and may be used
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    12
 hereby transferred.
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    13
"
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    14
"{ Package: 'stx:libbasic' }"
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    15
17308
ec60fc02a37f Fix in MiniLogger>>#log:severity:facility:originator:attachment:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17171
diff changeset
    16
"{ NameSpace: Smalltalk }"
ec60fc02a37f Fix in MiniLogger>>#log:severity:facility:originator:attachment:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17171
diff changeset
    17
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    18
Object subclass:#MiniLogger
17068
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    19
	instanceVariableNames:''
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
    20
	classVariableNames:'ALL DEBUG ENTER ERROR FATAL INFO Instance LEAVE LogFormat
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
    21
		LogOnStderr LogOnTranscript NONE Severities TRACE TRACE0 TRACE1
21609
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
    22
		TRACE2 TRACE3 Threshold ThresholdPerClass ThresholdPerPackage
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
    23
		TimestampFormat WARN WARNING'
17068
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    24
	poolDictionaries:''
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    25
	category:'System-Debugging-Support'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    26
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    27
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
    28
Magnitude subclass:#Severity
17068
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    29
	instanceVariableNames:'name value'
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    30
	classVariableNames:''
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    31
	poolDictionaries:''
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
    32
	privateIn:MiniLogger
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
    33
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
    34
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    35
!MiniLogger class methodsFor:'documentation'!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    36
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    37
copyright
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    38
"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
    39
 COPYRIGHT (c) 2012-2014 by Jan Vrany & eXept Software AG
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
    40
              All Rights Reserved
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    41
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    42
 This software is furnished under a license and may be used
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    43
 only in accordance with the terms of that license and with the
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    44
 inclusion of the above copyright notice.   This software may not
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    45
 be provided or otherwise made available to, or used by, any
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    46
 other person.  No title to or ownership of the software is
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    47
 hereby transferred.
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
    48
"
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    49
!
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    50
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    51
documentation
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    52
"
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    53
    A very simple logger for Smalltalk/X. This one is always present.
20505
51482561b0d3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20504
diff changeset
    54
    It mimics the protocol of the loggers found in stx:goodies/loggia,
51482561b0d3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20504
diff changeset
    55
    which can be activated by setting the global 'Logger' to an instance of
20733
3a3d8e7e94fd #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20732
diff changeset
    56
    one of them.
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    57
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    58
    All
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    59
        'Transcript show: 'Processor [info]: xxx'
20505
51482561b0d3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20504
diff changeset
    60
    should be rewritten over time to use the Logger.
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    61
20505
51482561b0d3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20504
diff changeset
    62
    'Object infoPrint' and 'Object debugPrint' have been changed to
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    63
    forward their messages to the global 'Logger' if not nil.
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    64
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    65
    Usage:
20507
2e4f8ef70102 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20506
diff changeset
    66
        Logger info: 'Hello world'.
2e4f8ef70102 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20506
diff changeset
    67
        Logger debug: 'Hello world'.
2e4f8ef70102 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20506
diff changeset
    68
        Logger warning: 'Hello world'.
2e4f8ef70102 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20506
diff changeset
    69
        Logger error: 'Hello world'.
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    70
20506
20572a649fb8 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20505
diff changeset
    71
    to disable logging:
20572a649fb8 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20505
diff changeset
    72
        MiniLogger logOnTranscript:false.
20572a649fb8 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20505
diff changeset
    73
        MiniLogger logOnStderr:false.
20733
3a3d8e7e94fd #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20732
diff changeset
    74
3a3d8e7e94fd #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20732
diff changeset
    75
    for selective logging:
3a3d8e7e94fd #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20732
diff changeset
    76
        Logger loggingThreshold: Logger severityALL.
3a3d8e7e94fd #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20732
diff changeset
    77
        Logger loggingThreshold: Logger severityINFO.
3a3d8e7e94fd #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20732
diff changeset
    78
        Logger loggingThreshold: Logger severityNONE.
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
    79
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
    80
    ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
    81
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    82
    The following keywords are expanded in the message:
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    83
        'LINE'      linenumber in the sending method
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    84
        'RECEIVER'  printstring of receiver in sending context
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    85
        'CLASS'     class of receiver in sending context
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    86
        'MCLASS'    class of sendig method
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    87
        'SELECTOR'  selector of sending method
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    88
        'WHO'       who-string of sending method
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    89
        'WHERE'     who-string plus linenumber of sending method
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    90
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    91
    i.e.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
    92
        Logger info:'%(WHERE) - some message here'
22505
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
    93
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    94
    For more examples, see #examples.
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    95
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    96
    [author:]
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    97
        Jan Vrany <jan.vrany@fit.cvut.cz>
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    98
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
    99
    [instance variables:]
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   100
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   101
    [class variables:]
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   102
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   103
    [see also:]
22505
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   104
        Loggia logging framework (stx:goodies/loggia)
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   105
"
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   106
!
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   107
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   108
examples
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
   109
"
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   110
    Simple logging (make sure logging threshold is lower or equal then
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   111
    Logger severityDEBUG, see #loggingThreshold:)
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
   112
                                                                        [exBegin]
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   113
        Logger debug: 'Hello world!!'
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   114
                                                                        [exEnd]
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   115
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   116
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   117
    You may use #<severity>:with:with: utility to format log message:
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
   118
                                                                        [exBegin]
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
   119
        |hostname port|
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   120
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   121
        hostname := 'www.google.com'.
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   122
        port := 80.
24133
e53dd957676b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24132
diff changeset
   123
        Logger error: 'Cannot connect to %1:%2' with: hostname with: port
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   124
                                                                        [exEnd]
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   125
21641
7c6e06a43728 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21640
diff changeset
   126
    and even automatically include a lineNumber:
21507
e8f27d16c43f #DOCUMENTATION by mawalch
mawalch
parents: 20959
diff changeset
   127
                                                                        [exBegin]
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   128
        Logger info: '[%(CLASS)>>%(SELECTOR):%(LINE)] Hello world!!'
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   129
                                                                        [exEnd]
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   130
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   131
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   132
"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   133
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   134
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   135
!MiniLogger class methodsFor:'initialization'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   136
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   137
initialize
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   138
    LogOnStderr := true.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   139
    LogOnTranscript := true.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   140
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   141
    ALL := Severity new initializeWithName:#all value:0.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   142
    ENTER := Severity new initializeWithName:#enter value:10.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   143
    LEAVE := Severity new initializeWithName:#leave value:10.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   144
    TRACE3 := Severity new initializeWithName:#trace3 value:20.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   145
    TRACE2 := Severity new initializeWithName:#trace2 value:30.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   146
    TRACE1 := Severity new initializeWithName:#trace1 value:40.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   147
    TRACE0 := Severity new initializeWithName:#trace0 value:50.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   148
    TRACE := Severity new initializeWithName:#trace value:50.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   149
    DEBUG := Severity new initializeWithName:#debug value:60.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   150
    INFO := Severity new initializeWithName:#info value:70.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   151
    WARN := Severity new initializeWithName:#warn value:88.
20490
f1c27208211f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20487
diff changeset
   152
    WARNING := Severity new initializeWithName:#warning value:88.
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   153
    ERROR := Severity new initializeWithName:#error value:99.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   154
    FATAL := Severity new initializeWithName:#fatal value:100.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   155
    NONE := Severity new initializeWithName:#none value:65535.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   156
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   157
    Severities := {ENTER. LEAVE. TRACE3. TRACE2. TRACE1. TRACE0. TRACE. DEBUG. INFO. WARN. WARNING. ERROR. FATAL.}.
17068
500f5e2c282f class: MiniLogger
Stefan Vogel <sv@exept.de>
parents: 16897
diff changeset
   158
    Threshold := InfoPrinting ifTrue:[INFO] ifFalse:[WARN].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   159
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   160
    (Smalltalk at:#Logger) isNil ifTrue:[
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   161
        Smalltalk at:#Logger put:self
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   162
    ].
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   163
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   164
    "Modified: / 13-08-2014 / 14:36:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
20508
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   165
! !
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   166
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   167
!MiniLogger class methodsFor:'accessing-log format'!
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   168
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   169
logFormat
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   170
    "will be used for the log message as:
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   171
        %1 [%2] (%3): %4
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   172
    with %1: facility (area)
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   173
    with %2: secerity (area)
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   174
    with %3: timestamp 
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   175
    with %4: caller/originator 
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   176
    with %5: message"
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   177
    
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   178
    ^ LogFormat ? '%1 [%2] (%3): %5'
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   179
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   180
    "
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   181
     MiniLogger logFormat:'%1 [%2]: %5'.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   182
     'hello' errorPrintCR.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   183
     MiniLogger logFormat:'%3 %1 [%2]: %5'.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   184
     'hello' errorPrintCR.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   185
     MiniLogger logFormat:nil.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   186
     'hello' errorPrintCR.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   187
    "
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   188
!
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   189
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   190
logFormat:aFormatString
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   191
    "will be used for the log message as:
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   192
        %1 [%2] (%3): %4
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   193
            with %1: facility (area)
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   194
            with %2: secerity (area)
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   195
            with %3: timestamp 
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   196
            with %4: caller/originator 
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   197
            with %5: message.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   198
     Pass anil argument to return to the default format.        
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   199
    "
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   200
    
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   201
    LogFormat := aFormatString
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   202
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   203
    "
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   204
     MiniLogger logFormat:'%1 [%2]: %5'.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   205
     'hello' errorPrintCR.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   206
     MiniLogger logFormat:'%3 %1 [%2]: %5'.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   207
     'hello' errorPrintCR.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   208
     MiniLogger logFormat:nil.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   209
     'hello' errorPrintCR.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   210
    "
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   211
!
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   212
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   213
logOnStderr 
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   214
    ^ LogOnStderr
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   215
!
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   216
20508
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   217
logOnStderr:aBoolean
22505
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   218
    "enable/disable logging on stderr"
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   219
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   220
    LogOnStderr := aBoolean
20508
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   221
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   222
    "
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   223
     MiniLogger logOnStderr:false
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   224
     MiniLogger logOnTranscript:false
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   225
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   226
     MiniLogger logOnStderr:true
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   227
     MiniLogger logOnTranscript:true
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   228
    "
22505
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   229
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   230
    "Modified (comment): / 25-01-2018 / 12:13:53 / mawalch"
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   231
!
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   232
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   233
logOnTranscript
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   234
    ^ LogOnTranscript 
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   235
!
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   236
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   237
logOnTranscript:aBoolean
22505
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   238
    "enable/disable logging on the Transcript"
20508
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   239
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   240
    LogOnTranscript := aBoolean
20508
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   241
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   242
    "
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   243
     MiniLogger logOnStderr:false
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   244
     MiniLogger logOnTranscript:false
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   245
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   246
     MiniLogger logOnStderr:true
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   247
     MiniLogger logOnTranscript:true
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   248
    "
22505
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   249
a85d5e597dd0 #DOCUMENTATION by mawalch
mawalch
parents: 22185
diff changeset
   250
    "Modified (comment): / 25-01-2018 / 12:13:36 / mawalch"
20508
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   251
!
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   252
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   253
timestampFormat
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   254
    "will be used for the log message"
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   255
    
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   256
    ^ TimestampFormat ? '%(year)-%(mon)-%(day) %h:%m:%s.%i'.
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   257
!
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   258
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   259
timestampFormat:aTimestampFormatString
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   260
    "will be used for the log message"
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   261
    
944d1ae32584 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20507
diff changeset
   262
    TimestampFormat := aTimestampFormatString
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   263
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   264
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   265
!MiniLogger class methodsFor:'accessing-severities'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   266
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   267
severities
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   268
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   269
    
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   270
    ^ Severities.
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   271
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   272
    "Modified (comment): / 06-02-2019 / 18:17:15 / Claus Gittinger"
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   273
!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   274
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   275
severityDEBUG
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   276
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   277
    
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   278
    ^ DEBUG
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   279
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   280
    "Created: / 13-08-2014 / 14:15:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   281
    "Modified (comment): / 06-02-2019 / 18:18:21 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   282
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   283
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   284
severityENTER
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   285
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   286
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   287
    ^ ENTER
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   288
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   289
    "Created: / 13-08-2014 / 14:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   290
    "Modified (comment): / 06-02-2019 / 18:18:24 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   291
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   292
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   293
severityERROR
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   294
    "setting this as treshold will print errors"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   295
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   296
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   297
    ^ ERROR
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   298
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   299
    "Created: / 13-08-2014 / 14:15:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   300
    "Modified (comment): / 06-02-2019 / 18:18:30 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   301
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   302
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   303
severityFATAL
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   304
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   305
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   306
    ^ FATAL
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   307
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   308
    "Created: / 13-08-2014 / 14:15:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   309
    "Modified (comment): / 06-02-2019 / 18:18:33 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   310
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   311
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   312
severityINFO
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   313
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   314
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   315
    ^ INFO
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   316
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   317
    "Created: / 13-08-2014 / 14:15:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   318
    "Modified (comment): / 06-02-2019 / 18:18:37 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   319
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   320
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   321
severityLEAVE
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   322
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   323
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   324
    ^ LEAVE
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   325
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   326
    "Created: / 13-08-2014 / 14:14:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   327
    "Modified (comment): / 06-02-2019 / 18:18:40 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   328
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   329
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   330
severityTRACE
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   331
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   332
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   333
    ^ TRACE
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   334
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   335
    "Created: / 13-08-2014 / 14:15:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   336
    "Modified (comment): / 06-02-2019 / 18:18:43 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   337
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   338
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   339
severityTRACE0
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   340
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   341
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   342
    ^ TRACE0
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   343
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   344
    "Created: / 13-08-2014 / 14:14:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   345
    "Modified (comment): / 06-02-2019 / 18:18:45 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   346
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   347
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   348
severityTRACE1
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   349
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   350
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   351
    ^ TRACE1
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   352
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   353
    "Created: / 13-08-2014 / 14:14:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   354
    "Modified (format): / 06-02-2019 / 18:18:51 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   355
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   356
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   357
severityTRACE2
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   358
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   359
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   360
    ^ TRACE2
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   361
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   362
    "Created: / 13-08-2014 / 14:14:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   363
    "Modified (comment): / 06-02-2019 / 18:18:54 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   364
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   365
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   366
severityTRACE3
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   367
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   368
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   369
    ^ TRACE3
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   370
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   371
    "Created: / 13-08-2014 / 14:14:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   372
    "Modified (comment): / 06-02-2019 / 18:18:57 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   373
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   374
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   375
severityWARN
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   376
    "setting this as treshold will print warnings and errors"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   377
    "ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   378
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   379
    ^ WARN
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   380
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   381
    "Created: / 13-08-2014 / 14:15:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   382
    "Modified (comment): / 06-02-2019 / 18:19:01 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   383
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   384
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   385
!MiniLogger class methodsFor:'accessing-severities-special'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   386
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   387
severityALL
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   388
    "setting this as treshold will print all"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   389
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   390
    ^ ALL
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   391
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   392
    "Created: / 13-08-2014 / 14:14:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   393
    "Modified (comment): / 06-02-2019 / 18:14:48 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   394
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   395
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   396
severityNONE
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   397
    "setting this as treshold will suppress all logging"
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   398
    
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   399
    ^ NONE
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   400
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   401
    "Created: / 13-08-2014 / 14:15:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   402
    "Modified (comment): / 06-02-2019 / 18:14:40 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   403
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   404
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   405
!MiniLogger class methodsFor:'configuration'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   406
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   407
loggingThreshold
22710
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   408
    "Return the logging threshold. 
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   409
     No messages with severity lower than threshold will be logged.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   410
     The default is 
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   411
        InfoPrinting ifTrue:[INFO] ifFalse:[WARN]
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   412
     meaning that by default, no trace and debug logs are generated."
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   413
    
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   414
    ^ Threshold
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   415
22710
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   416
    "
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   417
     self loggingThreshold:INFO.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   418
     self trace:'blabla'.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   419
     self loggingThreshold:TRACE.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   420
     self trace:'blabla'.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   421
     self loggingThreshold:INFO.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   422
    "
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   423
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   424
    "Created: / 13-08-2014 / 14:36:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   425
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   426
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   427
loggingThreshold:severity 
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   428
    "Sets logging threshold. 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   429
     All severities higher or equal to the given one will be logged.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   430
     Use `Logger severityNONE` to suppress logging completely 
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   431
     or `Logger severityALL` to log all messages.
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   432
     ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   433
    
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   434
    (
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   435
        (Severities includes:severity) 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   436
        or:[ severity == ALL or:[ severity == NONE ] ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   437
    ) ifFalse:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   438
        self error:'Invalid severity. Use of Logger severityXXX'.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   439
        ^ self.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   440
    ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   441
    Threshold := severity
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   442
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   443
    "
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   444
    Logger loggingThreshold: Logger severityALL.
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   445
    Logger loggingThreshold: Logger severityINFO.
23669
27c60ac0dcdb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23572
diff changeset
   446
    Logger loggingThreshold: Logger severityDEBUG.  -- only debug, warnings and errors 
27c60ac0dcdb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23572
diff changeset
   447
    Logger loggingThreshold: Logger severityWARN.   -- only warnings and errors 
27c60ac0dcdb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23572
diff changeset
   448
    Logger loggingThreshold: Logger severityERROR.  -- only errors
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   449
    
20485
8eb2274f91ae #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20218
diff changeset
   450
    Logger loggingThreshold: Logger severityNONE.
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   451
    "
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   452
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   453
    "Created: / 13-08-2014 / 14:34:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   454
    "Modified: / 26-08-2014 / 08:23:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   455
    "Modified (comment): / 09-10-2014 / 09:35:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   456
    "Modified (comment): / 01-03-2017 / 10:42:31 / cg"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   457
    "Modified (comment): / 06-02-2019 / 18:17:57 / Claus Gittinger"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   458
!
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   459
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   460
loggingThreshold:aLimitOrNil forClass:aClass
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   461
    "allows individual per-class setting of the threshold (useful during debugging).
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   462
     With a nil limit, the default is reinstalled for that class.
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   463
     ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   464
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   465
    "/ the original scheme asked the class;
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   466
    "/ but that required adding a getter to debugged classes, which
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   467
    "/ is easily forgotten and checked in.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   468
    "/ Better keep that nfo here, so wemight even provide a GUI for it some time in the future...
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   469
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   470
    "/ remember the class name - in case it is reloaded/changes identity etc.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   471
    aLimitOrNil isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   472
        ThresholdPerClass notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   473
            ThresholdPerClass removeKey:(aClass theNonMetaclass name) ifAbsent:[].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   474
            ThresholdPerClass isEmpty ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   475
                ThresholdPerClass := nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   476
            ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   477
        ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   478
        ^ self
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   479
    ].    
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   480
    ThresholdPerClass isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   481
        ThresholdPerClass := Dictionary new.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   482
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   483
    ThresholdPerClass at:aClass theNonMetaclass name put:aLimitOrNil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   484
21609
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   485
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   486
     Logger severityThresholdOf: Object
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   487
     Logger severityThresholdOf: Expecco::Browser
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   488
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   489
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   490
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   491
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'exept:workflow'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   492
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   493
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   494
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   495
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   496
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   497
    "Created: / 01-03-2017 / 10:52:25 / cg"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   498
    "Modified (comment): / 06-02-2019 / 18:18:03 / Claus Gittinger"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   499
!
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   500
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   501
loggingThreshold:aLimitOrNil forPackage:aPackageName
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   502
    "allows individual per-package setting of the threshold (useful during debugging).
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   503
     With a nil limit, the default is reinstalled for that class.
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   504
     ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   505
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   506
    "/ the original scheme only asked the class;
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   507
    "/ but that required adding many getters to debugged packages, 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   508
    "/ which are easily forgotten and checked in.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   509
    "/ Better keep that info here, so we might even provide a GUI for it some time in the future...
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   510
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   511
    "/ remember the class name - in case it is reloaded/changes identity etc.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   512
    aLimitOrNil isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   513
        ThresholdPerPackage notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   514
            ThresholdPerPackage removeKey:(aPackageName) ifAbsent:[].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   515
            ThresholdPerPackage isEmpty ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   516
                ThresholdPerPackage := nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   517
            ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   518
        ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   519
        ^ self
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   520
    ].    
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   521
    ThresholdPerPackage isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   522
        ThresholdPerPackage := Dictionary new.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   523
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   524
    ThresholdPerPackage at:aPackageName put:aLimitOrNil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   525
21609
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   526
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   527
     Logger severityThresholdOf: Object
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   528
     Logger severityThresholdOf: Expecco::Browser
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   529
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   530
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   531
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   532
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'exept:workflow'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   533
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   534
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   535
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   536
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   537
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   538
    "Created: / 01-03-2017 / 10:53:42 / cg"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   539
    "Modified (comment): / 06-02-2019 / 18:18:07 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   540
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   541
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   542
!MiniLogger class methodsFor:'logging'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   543
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   544
log:message 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   545
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   546
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   547
        severity:DEBUG
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   548
        originator:(thisContext sender receiver).
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   549
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   550
    "Created: / 15-09-2011 / 10:27:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   551
    "Modified: / 02-12-2014 / 10:52:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   552
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   553
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   554
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   555
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   556
log:message facility:facility 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   557
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   558
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   559
        severity:DEBUG
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   560
        facility:facility
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   561
        originator:(thisContext sender receiver)
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   562
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   563
    "Created: / 14-09-2011 / 21:22:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   564
    "Modified: / 02-12-2014 / 10:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   565
    "Modified (format): / 24-05-2019 / 00:25:42 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   566
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   567
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   568
log:message severity:severity 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   569
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   570
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   571
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   572
        originator:(thisContext sender receiver)
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   573
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   574
    "Created: / 15-09-2011 / 10:25:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   575
    "Modified: / 02-12-2014 / 10:53:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   576
    "Modified (format): / 24-05-2019 / 00:25:31 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   577
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   578
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   579
log:message severity:severity attachment:attachment 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   580
    |originator|
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   581
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   582
    originator := thisContext sender receiver.
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   583
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   584
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   585
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   586
        facility:(self facilityOf:originator)
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   587
        originator:originator
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   588
        attachment:attachment
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   589
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   590
    "Created: / 15-09-2011 / 11:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   591
    "Modified: / 15-03-2013 / 11:20:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   592
    "Modified (format): / 26-08-2014 / 08:23:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   593
    "Modified (format): / 24-05-2019 / 00:25:20 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   594
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   595
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   596
log:message severity:severity facility:facility 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   597
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   598
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   599
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   600
        facility:facility
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   601
        originator:thisContext sender receiver
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   602
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   603
    "Created: / 14-09-2011 / 21:20:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   604
    "Modified (format): / 24-05-2019 / 00:25:18 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   605
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   606
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   607
log:message severity:severity facility:facility originator:originator 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   608
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   609
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   610
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   611
        facility:facility
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   612
        originator:originator
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   613
        attachment:nil
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   614
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   615
    "Created: / 14-09-2011 / 21:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   616
    "Modified (format): / 24-05-2019 / 00:25:09 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   617
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   618
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   619
log:message severity:severity originator:originatorOrNil
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   620
    |originator|
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   621
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   622
    (originator := originatorOrNil) isNil ifTrue:[
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   623
        originator := thisContext sender.
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   624
        [originator notNil and:[originator receiver == self]] whileTrue:[
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   625
            originator := originator sender
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   626
        ].
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   627
        originator notNil ifTrue:[ originator := originator receiver ].
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   628
    ].    
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   629
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   630
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   631
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   632
        facility:(self facilityOf:originator)
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   633
        originator:originator
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   634
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   635
    "Created: / 15-09-2011 / 10:26:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   636
    "Modified: / 15-03-2013 / 11:20:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   637
    "Modified (format): / 24-05-2019 / 00:49:05 / Claus Gittinger"
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   638
! !
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   639
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   640
!MiniLogger class methodsFor:'logging - basic'!
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   641
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   642
log:message severity:severity facility:facilityArg originator:originator attachment:attachment
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   643
    "Pricipal logging method. This mimics VM __stxLog__()"
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   644
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   645
    | severityXlated messageXlated prevLogOnTranscript facility severityName words secondWord|
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   646
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   647
    (self canLog) ifFalse:[^ self].
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   648
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   649
    severityXlated := severity.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   650
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   651
    severityXlated isSymbol ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   652
        "/ Be backward compatible, allow for symbolic severities
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   653
        "/ but when encountered, issue a warning...
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   654
        severityXlated := Severities detect:[:each| each name == severityXlated] ifNone:[].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   655
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   656
        "/ This will be enabled later, so far it generates
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   657
        "/ way to much warnings. at least stx:libjava & exept:jdi has to be rewritten
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   658
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   659
        "/ self log: 'using symbols as severity is deprecated, use Logger severityXXX to get severity object' severity: WARN facility: 'STX' originator: self.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   660
        "/ caller := thisContext sender.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   661
        "/ [ caller notNil and: [ caller receiver ~~ originator ] ] whileTrue:[ caller := caller sender ].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   662
        "/ self log: 'caller is ', caller printString severity: INFO facility: 'STX' originator: self.
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   663
    ] ifFalse:[
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   664
        "/ Now check whether the severity is one of the predefined ones,
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   665
        "/ if not, issue an error
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   666
        (Severities includesIdentical:severityXlated) ifFalse:[ 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   667
            | caller |
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   668
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   669
            caller := thisContext sender.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   670
            [caller notNil and:[caller receiver ~~ originator]] whileTrue:[ 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   671
                caller := caller sender
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   672
            ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   673
            self log:('no such severity (%1, called from %2), use one from predefined severities. Original message will be logged as INFO' bindWith:severityXlated with:caller) 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   674
                 severity: ERROR facility: 'STX' originator: self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   675
            severityXlated := INFO.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   676
        ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   677
    ].
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   678
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   679
    messageXlated := message value asString.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   680
    facility := facilityArg.
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   681
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   682
    "/ hack to allow calls from #infoPrint/#errorPrint.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   683
    "/ if this is an oldStyle #infoPrint or #errorPrint, do not append another facility and severity
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   684
    words := messageXlated asCollectionOfWords.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   685
    (words size >= 2
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   686
     and:[words first isAlphaNumeric
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   687
     and:[((secondWord := words second) startsWith:$[ )
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   688
     and:[(secondWord endsWith:$]) or:[(secondWord endsWith:']:')]]]]) ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   689
        facility := words first.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   690
        severityName := secondWord copyFrom:2 to:(secondWord indexOf:$])-1.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   691
        severityXlated := Severities detect:[:each| each name = severityName] 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   692
                                     ifNone:[Severity new initializeWithName:severityName value:severity value].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   693
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   694
        messageXlated := messageXlated copyFrom:(messageXlated indexOf:$])+1.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   695
        (messageXlated startsWith:$:) ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   696
            messageXlated := messageXlated copyFrom:2.
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   697
        ].
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   698
        (messageXlated startsWith:Character space) ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   699
            messageXlated := messageXlated copyFrom:2.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   700
        ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   701
    ].
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   702
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   703
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   704
    (ThresholdPerClass isNil and:[ThresholdPerPackage isNil]) ifTrue:[
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   705
        (Threshold > severityXlated) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   706
    ] ifFalse:[
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   707
        ((self severityThresholdOf:originator) > severityXlated) ifTrue:[^ self ].  
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   708
    ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   709
    
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   710
    thisContext isRecursive ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   711
        'STX:Logger [error]: recursive logger invocation.' _errorPrintCR.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   712
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   713
    ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   714
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   715
    "/ to avoid recursion, turn off logOnTranscript while logging
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   716
    "/ had this problem with RecursionLock, which wanted to issue a warning
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   717
    "/ ("cleanup for dead process") from inside Transcript code.
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   718
    prevLogOnTranscript := LogOnTranscript.
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   719
    [
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   720
        LogOnTranscript := false.
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   721
        
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   722
        self basicLog:messageXlated severity:severityXlated facility:facility 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   723
             originator:originator attachment:attachment.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   724
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   725
        (prevLogOnTranscript and:[Transcript isView]) ifTrue:[
23200
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   726
            Transcript 
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   727
                nextPutAll:facility;
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   728
                nextPutAll:' [';
24103
759b7342d559 #BUGFIX by Stefan Reise
sr
parents: 24020
diff changeset
   729
                nextPutAll:severityXlated printString;
23200
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   730
                nextPutAll:']: ';
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   731
                nextPutLine:messageXlated.
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   732
        ].
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   733
    ] ensure:[
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   734
        LogOnTranscript := prevLogOnTranscript.
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   735
    ].
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   736
    
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   737
    "
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   738
     Logger log:'test message' severity:self severityINFO facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   739
     Logger log:'test message' severity:#info facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   740
     Logger log:'test message' severity:#bla facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   741
     Logger log:'test message' severity:123 facility: 'TEST'
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   742
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   743
     Logger log:'test message' severity: DEBUG facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   744
     Logger log:'test message' severity: INFO facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   745
     Logger log:'test message' asUnicode16String severity: INFO facility: 'TEST'
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
   746
     Logger log:'test message äöüß' severity: INFO facility: 'TEST'
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   747
     Logger log:'test message' severity: WARNING facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   748
     Logger log:'test message' severity: ERROR facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   749
     'test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   750
     'test message' errorPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   751
    "
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   752
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   753
    "backward compatibility with infoPrint/errorPrint callers:
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   754
     'foo [info] test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   755
     'bar [error] test message' errorPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   756
     'foo [info]: test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   757
     'bar [error]: test message' errorPrintCR
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   758
    "
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   759
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   760
    "Created: / 14-09-2011 / 21:18:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17308
ec60fc02a37f Fix in MiniLogger>>#log:severity:facility:originator:attachment:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17171
diff changeset
   761
    "Modified: / 20-01-2015 / 18:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   762
    "Modified: / 01-03-2017 / 11:15:46 / cg"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   763
    "Modified: / 28-06-2018 / 11:15:42 / Stefan Vogel"
23200
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   764
    "Modified: / 10-07-2018 / 00:16:35 / Claus Gittinger"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   765
    "Modified (format): / 06-02-2019 / 18:12:24 / Claus Gittinger"
24103
759b7342d559 #BUGFIX by Stefan Reise
sr
parents: 24020
diff changeset
   766
    "Modified: / 02-05-2019 / 13:50:07 / Stefan Reise"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   767
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   768
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   769
!MiniLogger class methodsFor:'logging - utils'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   770
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   771
debug:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   772
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   773
    
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   774
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   775
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   776
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   777
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   778
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   779
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   780
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   781
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   782
    "Modified: / 02-12-2014 / 10:54:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   783
    "Modified: / 13-03-2017 / 15:32:39 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   784
    "Modified (comment): / 24-05-2019 / 00:52:35 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   785
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   786
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   787
debug:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   788
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   789
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   790
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   791
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   792
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   793
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   794
        log:(self expand:format with: arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   795
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   796
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   797
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   798
    "Modified: / 02-12-2014 / 10:54:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   799
    "Modified (format): / 13-03-2017 / 15:37:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   800
    "Modified (comment): / 24-05-2019 / 00:52:40 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   801
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   802
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   803
debug:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   804
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   805
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   806
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   807
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   808
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   809
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   810
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   811
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   812
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   813
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   814
    "Modified: / 02-12-2014 / 10:54:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   815
    "Modified: / 13-03-2017 / 15:39:04 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   816
    "Modified (comment): / 24-05-2019 / 00:52:44 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   817
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   818
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   819
debug:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   820
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   821
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   822
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   823
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   824
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   825
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   826
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   827
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   828
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   829
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   830
    "Modified: / 02-12-2014 / 10:54:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   831
    "Modified: / 13-03-2017 / 15:41:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   832
    "Modified (comment): / 24-05-2019 / 00:52:47 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   833
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   834
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   835
enter:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   836
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   837
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   838
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   839
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   840
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   841
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   842
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   843
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   844
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   845
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   846
    "Modified: / 02-12-2014 / 10:54:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   847
    "Modified: / 13-03-2017 / 15:35:15 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   848
    "Modified (comment): / 24-05-2019 / 00:54:48 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   849
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   850
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   851
enter:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   852
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   853
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   854
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   855
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   856
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   857
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   858
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   859
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   860
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   861
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   862
    "Modified: / 02-12-2014 / 10:54:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   863
    "Modified: / 13-03-2017 / 15:37:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   864
    "Modified (comment): / 24-05-2019 / 00:54:50 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   865
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   866
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   867
enter:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   868
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   869
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   870
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   871
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   872
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   873
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   874
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   875
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   876
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   877
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   878
    "Modified: / 02-12-2014 / 10:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   879
    "Modified: / 13-03-2017 / 15:39:07 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   880
    "Modified (comment): / 24-05-2019 / 00:54:52 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   881
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   882
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   883
enter:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   884
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   885
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   886
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   887
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   888
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   889
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   890
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   891
        severity:ENTER 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   892
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   893
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   894
    "Modified: / 02-12-2014 / 10:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   895
    "Modified: / 13-03-2017 / 15:41:32 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   896
    "Modified (comment): / 24-05-2019 / 00:54:55 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   897
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   898
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   899
error:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   900
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   901
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   902
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   903
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   904
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   905
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   906
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   907
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   908
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   909
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   910
    "Modified: / 02-12-2014 / 10:54:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   911
    "Modified: / 13-03-2017 / 15:35:29 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   912
    "Modified (comment): / 24-05-2019 / 00:54:58 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   913
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   914
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   915
error:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   916
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   917
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   918
   "/ a quick rejector to avoid overhead in deployed apps
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   919
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   920
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   921
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   922
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   923
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   924
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   925
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   926
    "Modified: / 02-12-2014 / 10:54:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   927
    "Modified: / 13-03-2017 / 15:37:55 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   928
    "Modified (comment): / 24-05-2019 / 00:55:00 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   929
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   930
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   931
error:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   932
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   933
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   934
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   935
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   936
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   937
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   938
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   939
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   940
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   941
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   942
    "Modified: / 02-12-2014 / 10:54:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   943
    "Modified: / 13-03-2017 / 15:39:12 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   944
    "Modified (comment): / 24-05-2019 / 00:55:03 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   945
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   946
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   947
error:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   948
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   949
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   950
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   951
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   952
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   953
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   954
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   955
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   956
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   957
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   958
    "Modified: / 02-12-2014 / 10:54:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   959
    "Modified: / 13-03-2017 / 15:41:37 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   960
    "Modified (comment): / 24-05-2019 / 00:55:06 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   961
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   962
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   963
fatal:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   964
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   965
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   966
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   967
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   968
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   969
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   970
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   971
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   972
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   973
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   974
    "Modified: / 02-12-2014 / 10:54:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   975
    "Modified: / 13-03-2017 / 15:35:41 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   976
    "Modified (comment): / 24-05-2019 / 00:55:12 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   977
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   978
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   979
fatal:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   980
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   981
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   982
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   983
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   984
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   985
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   986
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   987
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   988
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   989
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   990
    "Modified: / 02-12-2014 / 10:54:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   991
    "Modified: / 13-03-2017 / 15:37:58 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   992
    "Modified (comment): / 24-05-2019 / 00:55:16 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   993
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   994
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   995
fatal:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   996
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   997
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   998
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   999
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1000
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1001
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1002
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1003
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1004
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1005
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1006
    "Modified: / 02-12-2014 / 10:54:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1007
    "Modified: / 13-03-2017 / 15:40:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1008
    "Modified (comment): / 24-05-2019 / 00:55:19 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1009
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1010
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1011
fatal:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1012
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1013
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1014
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1015
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1016
    
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1017
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1018
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1019
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1020
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1021
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1022
    "Modified: / 02-12-2014 / 10:54:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1023
    "Modified: / 13-03-2017 / 15:41:40 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1024
    "Modified (comment): / 24-05-2019 / 00:55:22 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1025
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1026
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1027
info:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1028
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1029
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1030
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1031
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1032
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1033
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1034
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1035
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1036
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1037
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1038
    "Modified: / 02-12-2014 / 10:55:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1039
    "Modified: / 13-03-2017 / 15:35:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1040
    "Modified (comment): / 24-05-2019 / 00:55:25 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1041
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1042
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1043
info:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1044
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1045
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1046
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1047
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1048
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1049
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1050
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1051
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1052
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1053
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1054
    "Modified: / 02-12-2014 / 10:55:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1055
    "Modified: / 13-03-2017 / 15:38:01 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1056
    "Modified (comment): / 24-05-2019 / 00:55:28 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1057
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1058
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1059
info:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1060
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1061
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1062
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1063
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1064
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1065
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1066
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1067
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1068
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1069
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1070
    "Modified: / 02-12-2014 / 10:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1071
    "Modified: / 13-03-2017 / 15:40:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1072
    "Modified (comment): / 24-05-2019 / 00:55:33 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1073
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1074
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1075
info:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1076
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1077
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1078
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1079
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1080
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1081
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1082
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1083
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1084
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1085
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1086
    "Modified: / 02-12-2014 / 10:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1087
    "Modified: / 13-03-2017 / 15:41:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1088
    "Modified (comment): / 24-05-2019 / 00:55:36 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1089
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1090
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1091
info:format with:arg1 with:arg2 with:arg3 with:arg4
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1092
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1093
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1094
    "/ a quick rejector to avoid overhead in deployed apps
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1095
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1096
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1097
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1098
        log:(self expand:format with:arg1 with:arg2 with:arg3 with:arg4) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1099
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1100
        originator:nil
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1101
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1102
    "Modified: / 02-12-2014 / 10:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1103
    "Modified: / 13-03-2017 / 15:41:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1104
    "Modified (comment): / 24-05-2019 / 00:55:41 / Claus Gittinger"
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1105
!
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1106
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1107
leave: message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1108
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1109
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1110
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1111
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1112
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1113
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1114
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1115
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1116
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1117
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1118
    "Modified: / 02-12-2014 / 10:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1119
    "Modified: / 13-03-2017 / 15:36:02 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1120
    "Modified (comment): / 24-05-2019 / 00:54:27 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1121
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1122
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1123
leave: format with: arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1124
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1125
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1126
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1127
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1128
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1129
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1130
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1131
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1132
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1133
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1134
    "Modified: / 02-12-2014 / 10:55:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1135
    "Modified: / 13-03-2017 / 15:38:05 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1136
    "Modified (comment): / 24-05-2019 / 00:54:33 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1137
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1138
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1139
leave: format with: arg1 with: arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1140
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1141
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1142
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1143
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1144
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1145
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1146
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1147
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1148
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1149
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1150
    "Modified: / 02-12-2014 / 10:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1151
    "Modified: / 13-03-2017 / 15:40:32 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1152
    "Modified (comment): / 24-05-2019 / 00:54:36 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1153
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1154
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1155
leave: format with: arg1 with: arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1156
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1157
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1158
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1159
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1160
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1161
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1162
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1163
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1164
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1165
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1166
    "Modified: / 02-12-2014 / 10:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1167
    "Modified: / 13-03-2017 / 15:42:06 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1168
    "Modified (comment): / 24-05-2019 / 00:54:39 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1169
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1170
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1171
trace0: message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1172
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1173
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1174
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1175
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1176
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1177
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1178
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1179
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1180
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1181
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1182
    "Modified: / 02-12-2014 / 10:55:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1183
    "Modified: / 13-03-2017 / 15:36:15 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1184
    "Modified (comment): / 24-05-2019 / 00:56:19 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1185
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1186
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1187
trace0: format with: arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1188
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1189
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1190
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1191
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1192
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1193
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1194
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1195
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1196
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1197
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1198
    "Modified: / 02-12-2014 / 10:55:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1199
    "Modified: / 13-03-2017 / 15:38:09 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1200
    "Modified (comment): / 24-05-2019 / 00:56:23 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1201
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1202
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1203
trace0: format with: arg1 with: arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1204
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1205
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1206
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1207
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1208
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1209
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1210
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1211
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1212
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1213
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1214
    "Modified: / 02-12-2014 / 10:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1215
    "Modified: / 13-03-2017 / 15:40:35 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1216
    "Modified: / 24-05-2019 / 00:56:39 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1217
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1218
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1219
trace0: format with: arg1 with: arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1220
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1221
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1222
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1223
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1224
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1225
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1226
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1227
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1228
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1229
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1230
    "Modified: / 02-12-2014 / 10:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1231
    "Modified: / 13-03-2017 / 15:42:09 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1232
    "Modified: / 24-05-2019 / 00:56:58 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1233
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1234
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1235
trace1: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1236
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1237
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1238
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1239
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1240
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1241
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1242
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1243
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1244
    "Modified: / 02-12-2014 / 10:55:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1245
    "Modified: / 13-03-2017 / 15:36:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1246
    "Modified (format): / 24-05-2019 / 00:58:10 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1247
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1248
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1249
trace1: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1250
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1251
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1252
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1253
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1254
        log:(self expand:format with:arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1255
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1256
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1257
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1258
    "Modified: / 02-12-2014 / 10:55:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1259
    "Modified: / 13-03-2017 / 15:38:13 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1260
    "Modified (format): / 24-05-2019 / 00:58:02 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1261
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1262
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1263
trace1: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1264
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1265
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1266
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1267
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1268
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1269
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1270
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1271
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1272
    "Modified: / 02-12-2014 / 10:55:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1273
    "Modified: / 13-03-2017 / 15:40:40 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1274
    "Modified (format): / 24-05-2019 / 00:57:47 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1275
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1276
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1277
trace1: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1278
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1279
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1280
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1281
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1282
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1283
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1284
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1285
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1286
    "Modified: / 02-12-2014 / 10:55:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1287
    "Modified: / 13-03-2017 / 15:42:14 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1288
    "Modified (format): / 24-05-2019 / 00:57:35 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1289
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1290
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1291
trace2: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1292
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1293
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1294
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1295
    self log:(self expand:message) severity:TRACE2 originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1296
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1297
    "Modified: / 02-12-2014 / 10:55:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1298
    "Modified: / 13-03-2017 / 15:36:34 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1299
    "Modified: / 24-05-2019 / 00:58:21 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1300
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1301
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1302
trace2: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1303
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1304
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1305
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1306
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1307
        log: (self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1308
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1309
        originator: nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1310
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1311
    "Modified: / 02-12-2014 / 10:55:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1312
    "Modified: / 13-03-2017 / 15:38:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1313
    "Modified (format): / 24-05-2019 / 01:01:31 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1314
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1315
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1316
trace2: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1317
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1318
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1319
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1320
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1321
        log: (self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1322
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1323
        originator: nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1324
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1325
    "Modified: / 02-12-2014 / 10:55:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1326
    "Modified: / 13-03-2017 / 15:40:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1327
    "Modified (format): / 24-05-2019 / 01:01:23 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1328
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1329
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1330
trace2: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1331
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1332
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1333
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1334
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1335
        log: (self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1336
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1337
        originator: nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1338
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1339
    "Modified: / 02-12-2014 / 10:55:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1340
    "Modified: / 13-03-2017 / 15:42:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1341
    "Modified (format): / 24-05-2019 / 01:01:15 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1342
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1343
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1344
trace3: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1345
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1346
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1347
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1348
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1349
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1350
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1351
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1352
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1353
    "Modified: / 02-12-2014 / 10:55:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1354
    "Modified: / 13-03-2017 / 15:36:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1355
    "Modified (format): / 24-05-2019 / 01:01:01 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1356
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1357
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1358
trace3: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1359
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1360
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1361
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1362
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1363
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1364
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1365
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1366
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1367
    "Modified: / 02-12-2014 / 10:55:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1368
    "Modified: / 13-03-2017 / 15:38:19 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1369
    "Modified (format): / 24-05-2019 / 01:00:53 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1370
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1371
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1372
trace3: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1373
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1374
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1375
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1376
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1377
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1378
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1379
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1380
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1381
    "Modified: / 02-12-2014 / 10:56:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1382
    "Modified: / 13-03-2017 / 15:40:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1383
    "Modified (format): / 24-05-2019 / 01:00:41 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1384
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1385
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1386
trace3: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1387
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1388
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1389
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1390
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1391
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1392
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1393
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1394
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1395
    "Modified: / 02-12-2014 / 10:56:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1396
    "Modified: / 13-03-2017 / 15:42:20 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1397
    "Modified (format): / 24-05-2019 / 01:00:28 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1398
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1399
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1400
trace: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1401
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1402
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1403
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1404
    self log:(self expand:message) severity:TRACE originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1405
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1406
    "Modified: / 02-12-2014 / 10:56:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1407
    "Modified: / 13-03-2017 / 15:36:55 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1408
    "Modified: / 24-05-2019 / 00:58:58 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1409
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1410
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1411
trace: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1412
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1413
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1414
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1415
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1416
        log:(self expand:format with:arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1417
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1418
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1419
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1420
    "Modified: / 02-12-2014 / 10:56:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1421
    "Modified: / 13-03-2017 / 15:38:29 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1422
    "Modified (format): / 24-05-2019 / 01:00:04 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1423
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1424
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1425
trace: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1426
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1427
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1428
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1429
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1430
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1431
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1432
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1433
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1434
    "Modified: / 02-12-2014 / 10:56:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1435
    "Modified: / 13-03-2017 / 15:40:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1436
    "Modified: / 24-05-2019 / 00:59:48 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1437
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1438
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1439
trace: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1440
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1441
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1442
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1443
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1444
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1445
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1446
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1447
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1448
    "Modified: / 02-12-2014 / 10:56:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1449
    "Modified: / 13-03-2017 / 15:42:24 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1450
    "Modified (format): / 24-05-2019 / 00:59:27 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1451
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1452
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1453
warning:message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1454
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1455
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1456
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1457
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1458
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1459
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1460
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1461
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1462
    "Modified: / 02-12-2014 / 10:56:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1463
    "Modified: / 13-03-2017 / 15:37:05 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1464
    "Modified: / 24-05-2019 / 00:49:10 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1465
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1466
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1467
warning:format with:arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1468
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1469
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1470
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1471
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1472
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1473
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1474
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1475
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1476
    "Modified: / 02-12-2014 / 10:56:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1477
    "Modified: / 13-03-2017 / 15:38:31 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1478
    "Modified: / 24-05-2019 / 00:49:49 / Claus Gittinger"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1479
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1480
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1481
warning:format with:arg1 with:arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1482
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1483
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1484
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1485
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1486
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1487
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1488
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1489
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1490
    "Modified: / 02-12-2014 / 10:56:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1491
    "Modified: / 13-03-2017 / 15:40:54 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1492
    "Modified: / 24-05-2019 / 00:49:52 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1493
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1494
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1495
warning:format with:arg1 with:arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1496
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1497
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1498
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1499
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1500
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1501
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1502
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1503
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1504
    "Modified: / 02-12-2014 / 10:56:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1505
    "Modified: / 13-03-2017 / 15:42:27 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1506
    "Modified: / 24-05-2019 / 00:49:56 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1507
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1508
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1509
!MiniLogger class methodsFor:'private'!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1510
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1511
basicLog: message severity: severity facility: facility originator: originator attachment: attachment
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1512
    "Principal logging method. This mimics VM __stxLog__()"
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1513
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1514
    |messageAsSent|
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1515
23572
75f7f0f297a2 #BUGFIX by sr
sr
parents: 23200
diff changeset
  1516
    (LogOnStderr not 
75f7f0f297a2 #BUGFIX by sr
sr
parents: 23200
diff changeset
  1517
    or:[Stderr isNil]) ifTrue:[
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1518
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1519
    ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1520
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1521
    messageAsSent := 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1522
            self logFormat
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1523
                bindWith:(facility ? 'STX')
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1524
                with:severity name
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1525
                with:(Timestamp now printStringFormat:(self timestampFormat))
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1526
                with:originator
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1527
                with:message.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1528
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1529
    "/ If the message is Unicode 16/32 string and stream is external,
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1530
    "/ we have to recode the message using locale-specific encoding
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1531
    Stderr isExternalStream ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1532
        messageAsSent := messageAsSent string.  "take care of Texts"
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1533
        messageAsSent containsNon7BitAscii ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1534
            OperatingSystem isMSWINDOWSlike ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1535
                messageAsSent := messageAsSent utf8Encoded.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1536
            ] ifFalse:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1537
                messageAsSent := OperatingSystem encodePath:messageAsSent.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1538
            ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1539
        ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1540
        [
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1541
            Stderr nextPutLine: messageAsSent
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1542
        ] on:StreamError do:[:ex|
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1543
            'STX:Logger [error]: error writing to stream: ' _errorPrint.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1544
            ex description _errorPrintCR.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1545
            messageAsSent _errorPrintCR.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1546
        ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1547
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1548
    ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1549
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1550
    Stderr nextPutLine: messageAsSent
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1551
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1552
    "Created: / 28-06-2018 / 11:05:17 / Stefan Vogel"
23572
75f7f0f297a2 #BUGFIX by sr
sr
parents: 23200
diff changeset
  1553
    "Modified: / 20-12-2018 / 12:33:00 / sr"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1554
!
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1555
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1556
expand:message
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1557
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1558
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1559
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1560
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1561
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1562
    "Created: / 13-03-2017 / 15:34:47 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1563
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1564
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1565
expand:message addingInfoFrom:aContext to:aDictionary
21682
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1566
    |messageString mthd rcvr methodWho|
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1567
    
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1568
    (messageString := message) isString ifFalse:[
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1569
        messageString := message value asString.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1570
        messageString isString ifFalse:[ ^ messageString asString].
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1571
    ].
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1572
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1573
    mthd := aContext method.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1574
    rcvr := aContext receiver.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1575
    methodWho := mthd whoString.
21681
08cdd57378f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 21644
diff changeset
  1576
    
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1577
    aDictionary at:'LINE' put:(aContext lineNumber).
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1578
    aDictionary at:'RECEIVER' put:[rcvr displayString].
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1579
    aDictionary at:'CLASS' put:(rcvr class name).
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1580
    aDictionary at:'MCLASS' put:(mthd mclass displayString).
24133
e53dd957676b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24132
diff changeset
  1581
    aDictionary at:'SELECTOR' put:(mthd selector ? 'doIt').
21682
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1582
    aDictionary at:'WHO' put:methodWho.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1583
    aDictionary at:'WHERE' put:(methodWho,'@',aContext lineNumber printString).
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1584
    ^ messageString expandPlaceholdersWith:aDictionary
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1585
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1586
    "
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1587
     Logger warning:'some problem with %(RECEIVER)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1588
     Logger warning:'some problem with %(RECEIVER) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1589
     Logger warning:'some problem with %(CLASS) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1590
     Logger warning:'some problem with %(MCLASS) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1591
     Logger warning:'some problem with %(SELECTOR) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1592
     Logger warning:'some problem with %(WHERE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1593
    "
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1594
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1595
    "Created: / 13-03-2017 / 15:46:52 / cg"
21741
02a8a0495313 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 21682
diff changeset
  1596
    "Modified: / 03-05-2017 / 15:38:35 / cg"
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1597
    "Modified: / 05-06-2019 / 21:06:40 / Claus Gittinger"
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1598
    "Modified (comment): / 06-06-2019 / 09:05:07 / Claus Gittinger"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1599
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1600
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1601
expand:message with:arg1
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1602
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1603
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1604
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1605
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1606
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1607
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1608
    "Created: / 13-03-2017 / 15:37:25 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1609
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1610
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1611
expand:message with:arg1 with:arg2
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1612
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1613
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1614
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1615
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1616
    d at:2 put:arg2.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1617
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1618
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1619
    "Created: / 13-03-2017 / 15:38:50 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1620
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1621
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1622
expand:message with:arg1 with:arg2 with:arg3
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1623
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1624
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1625
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1626
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1627
    d at:2 put:arg2.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1628
    d at:3 put:arg3.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1629
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1630
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1631
    "Created: / 13-03-2017 / 15:41:05 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1632
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1633
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1634
expand:message with:arg1 with:arg2 with:arg3 with:arg4
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1635
    |d|
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1636
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1637
    d := Dictionary new.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1638
    d at:1 put:arg1.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1639
    d at:2 put:arg2.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1640
    d at:3 put:arg3.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1641
    d at:4 put:arg4.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1642
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1643
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1644
    "Created: / 13-03-2017 / 15:41:05 / cg"
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1645
!
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1646
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1647
facilityOf:originator 
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1648
    originator isProtoObject ifTrue:[
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1649
        ^ originator class logFacility.
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1650
    ].
24141
e3c4af5e8b20 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 24139
diff changeset
  1651
    ^ originator logFacility
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1652
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1653
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1654
"/    ^ originator class
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1655
"/        perform:#logFacility
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1656
"/        ifNotUnderstood:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1657
"/            |pkg|
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1658
"/
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1659
"/            pkg := originator class package.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1660
"/            (pkg startsWith:'stx') ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1661
"/                'STX'
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1662
"/            ] ifFalse:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1663
"/                pkg copyFrom:((pkg lastIndexOf:$:) + 1)
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1664
"/            ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1665
"/        ]
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1666
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1667
    "
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1668
     Logger facilityOf: Object
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1669
     Logger facilityOf: Expecco::Browser
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1670
    "
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1671
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1672
    "Created: / 15-09-2011 / 10:20:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1673
    "Modified: / 01-03-2017 / 10:43:23 / cg"
24141
e3c4af5e8b20 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 24139
diff changeset
  1674
    "Modified: / 24-05-2019 / 01:04:34 / Claus Gittinger"
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1675
    "Modified: / 28-05-2019 / 13:07:06 / Stefan Vogel"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1676
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1677
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1678
severityThresholdOf:originator
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1679
    "allow each class to define an individual threshold for Logging"
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1680
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1681
    |cls t|
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1682
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1683
    cls := originator class.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1684
    ThresholdPerClass notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1685
        t := ThresholdPerClass at:(cls theNonMetaclass name) ifAbsent:nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1686
        t notNil ifTrue:[^ t].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1687
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1688
    ThresholdPerPackage notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1689
        t := ThresholdPerPackage at:(cls package) ifAbsent:nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1690
        t notNil ifTrue:[^ t].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1691
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1692
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1693
    "/ disabled; the above scheme is better...
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1694
    "/ ^ cls 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1695
    "/    perform:#logSeverityThreshold
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1696
    "/     ifNotUnderstood:[ ^ Threshold ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1697
    ^ Threshold
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1698
    
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1699
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1700
     Logger severityThresholdOf: Object
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1701
     Logger severityThresholdOf: Expecco::Browser
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1702
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1703
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1704
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1705
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1706
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1707
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1708
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1709
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1710
    "Created: / 15-09-2011 / 10:20:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1711
    "Modified (comment): / 01-03-2017 / 10:59:12 / cg"
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1712
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1713
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1714
!MiniLogger class methodsFor:'queries'!
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1715
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1716
canLog
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1717
    "answer true, if logging can be performed. Subclasse may redefine this."
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1718
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1719
    ^ (LogOnStderr and:[Stderr notNil])
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1720
       or:[LogOnTranscript and:[Transcript isView]].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1721
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1722
    "Created: / 28-06-2018 / 10:47:29 / Stefan Vogel"
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1723
! !
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1724
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1725
!MiniLogger::Severity methodsFor:'accessing'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1726
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1727
name
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1728
    ^ name
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1729
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1730
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1731
value
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1732
    ^ value
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1733
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1734
21796
25b71e5e33b6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21741
diff changeset
  1735
!MiniLogger::Severity methodsFor:'arithmetic'!
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1736
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1737
+ aNumber
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1738
    |next|
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1739
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1740
    next := value + aNumber.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1741
    aNumber negative ifTrue:[
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1742
        ^ MiniLogger severities detectLast:[:each| each = next or:[each < next]] ifNone:[self class new initializeWithName:#nil value:next]
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1743
    ].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1744
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1745
    ^ MiniLogger severities detect:[:each| each >= next] ifNone:[self class new initializeWithName:#nil value:next]
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1746
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1747
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1748
        MiniLogger severityINFO + 1
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1749
        MiniLogger severityTRACE to:MiniLogger severityFATAL do:[:each| Transcript showCR:each].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1750
        MiniLogger severityFATAL downTo:MiniLogger severityTRACE do:[:each| Transcript showCR:each].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1751
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1752
! !
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1753
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1754
!MiniLogger::Severity methodsFor:'comparing'!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1755
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1756
< aSeverity
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1757
    ^ value < aSeverity value
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1758
!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1759
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1760
= aSeverity
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1761
    ^ self == aSeverity or:[value = aSeverity value]
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1762
!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1763
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1764
hash
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1765
    "instances, for which #= answers true must answer the same hash"
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1766
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1767
    ^ value hash
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1768
! !
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1769
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1770
!MiniLogger::Severity methodsFor:'initialization'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1771
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1772
initializeWithName: aString value: anInteger
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1773
    name := aString.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1774
    value := anInteger
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1775
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1776
    "Created: / 13-08-2014 / 13:00:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1777
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1778
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1779
!MiniLogger::Severity methodsFor:'printing & storing'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1780
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1781
displayOn:aStream
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1782
    "append a printed representation of the receiver to the argument, aStream.
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1783
     for developers "
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1784
24129
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1785
    name printOn:aStream.
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1786
    aStream nextPutAll:':'.
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1787
    value printOn:aStream.
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1788
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1789
    "Created: / 22-05-2019 / 19:24:12 / Claus Gittinger"
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1790
!
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1791
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1792
printOn:aStream
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1793
    "append a printed representation of the receiver to the argument, aStream"
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1794
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1795
    name printOn:aStream.
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1796
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1797
    "Modified: / 13-08-2014 / 13:46:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1798
    "Modified: / 22-05-2019 / 19:24:16 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1799
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1800
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1801
!MiniLogger class methodsFor:'documentation'!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1802
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1803
version
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  1804
    ^ '$Header$'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1805
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1806
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1807
version_CVS
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  1808
    ^ '$Header$'
14881
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1809
!
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1810
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1811
version_HG
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1812
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1813
    ^ '$Changeset: <not expanded> $'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1814
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1815
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1816
version_SVN
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  1817
    ^ '$Id$'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1818
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1819
14881
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1820
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1821
MiniLogger initialize!