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