MiniLogger.st
author Claus Gittinger <cg@exept.de>
Thu, 06 Feb 2020 21:18:18 +0100
changeset 25250 00afed939386
parent 25239 b1563bf0a20f
child 25308 7dba8ded6732
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
     1
"{ Encoding: utf8 }"
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
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
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
   618
    "Pricipal logging method. This mimics VM's __stxLog__()"
16826
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:[
25212
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   718
                    msg := msg withColor:Color orange slightlyDarkened.
24829
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
    "
25212
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   729
     Logger info:'some info'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   730
     Logger warning:'some warning'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   731
     Logger error:'some error'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   732
     Logger debug:'some debug'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   733
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   734
     Logger log:'test message' severity:self severityINFO facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   735
     Logger log:'test message' severity:#info facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   736
     Logger log:'test message' severity:#bla facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   737
     Logger log:'test message' severity:123 facility: 'TEST'
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   738
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   739
     Logger log:'test message' severity: DEBUG facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   740
     Logger log:'test message' severity: INFO facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   741
     Logger log:'test message' asUnicode16String severity: INFO facility: 'TEST'
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
   742
     Logger log:'test message äöüß' severity: INFO facility: 'TEST'
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   743
     Logger log:'test message' severity: WARNING facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   744
     Logger log:'test message' severity: ERROR facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   745
     'test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   746
     'test message' errorPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   747
    "
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   748
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   749
    "backward compatibility with infoPrint/errorPrint callers:
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   750
     'foo [info] test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   751
     'bar [error] test message' errorPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   752
     'foo [info]: test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   753
     'bar [error]: test message' errorPrintCR
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   754
    "
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   755
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   756
    "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
   757
    "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
   758
    "Modified: / 01-03-2017 / 11:15:46 / cg"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   759
    "Modified: / 28-06-2018 / 11:15:42 / Stefan Vogel"
23200
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   760
    "Modified: / 10-07-2018 / 00:16:35 / Claus Gittinger"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   761
    "Modified (format): / 06-02-2019 / 18:12:24 / Claus Gittinger"
24103
759b7342d559 #BUGFIX by Stefan Reise
sr
parents: 24020
diff changeset
   762
    "Modified: / 02-05-2019 / 13:50:07 / Stefan Reise"
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   763
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   764
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   765
log:message severity:severity originator:originatorOrNil
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   766
    |originator|
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 := originatorOrNil) isNil ifTrue:[
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   769
        originator := thisContext sender.
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   770
        [originator notNil and:[originator receiver == self]] whileTrue:[
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   771
            originator := originator sender
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   772
        ].
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   773
        originator notNil ifTrue:[ originator := originator receiver ].
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   774
    ].    
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   775
    self 
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   776
        log:message
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   777
        severity:severity
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   778
        facility:(self facilityOf:originator)
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   779
        originator:originator
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
   780
        attachment:nil
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   781
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   782
    "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
   783
    "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
   784
    "Modified (format): / 24-05-2019 / 00:49:05 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   785
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   786
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   787
!MiniLogger class methodsFor:'logging - utils'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   788
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   789
debug:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   790
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   791
    
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   792
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   793
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   794
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   795
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   796
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   797
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   798
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   799
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   800
    "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
   801
    "Modified: / 13-03-2017 / 15:32:39 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   802
    "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
   803
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   804
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   805
debug:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   806
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   807
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   808
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   809
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   810
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   811
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   812
        log:(self expand:format with: arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   813
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   814
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   815
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   816
    "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
   817
    "Modified (format): / 13-03-2017 / 15:37:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   818
    "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
   819
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   820
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   821
debug:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   822
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   823
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   824
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   825
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   826
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   827
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   828
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   829
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   830
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   831
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   832
    "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
   833
    "Modified: / 13-03-2017 / 15:39:04 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   834
    "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
   835
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   836
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   837
debug:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   838
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   839
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   840
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   841
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   842
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   843
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   844
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   845
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   846
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   847
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   848
    "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
   849
    "Modified: / 13-03-2017 / 15:41:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   850
    "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
   851
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   852
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   853
debug:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   854
    "generate a 'debug'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   855
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   856
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   857
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   858
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   859
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   860
        log:(self expand:format withArguments: arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   861
        severity:DEBUG 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   862
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   863
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   864
    "Created: / 05-08-2019 / 21:06:26 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   865
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   866
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   867
enter:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   868
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   869
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   870
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   871
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   872
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   873
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   874
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   875
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   876
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   877
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   878
    "Modified: / 02-12-2014 / 10:54:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   879
    "Modified: / 13-03-2017 / 15:35:15 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   880
    "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
   881
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   882
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   883
enter:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   884
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   885
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   886
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   887
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   888
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   889
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   890
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   891
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   892
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   893
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   894
    "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
   895
    "Modified: / 13-03-2017 / 15:37:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   896
    "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
   897
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   898
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   899
enter:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   900
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   901
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   902
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   903
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   904
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   905
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   906
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   907
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   908
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   909
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   910
    "Modified: / 02-12-2014 / 10:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   911
    "Modified: / 13-03-2017 / 15:39:07 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   912
    "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
   913
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   914
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   915
enter:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   916
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   917
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   918
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   919
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   920
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   921
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   922
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   923
        severity:ENTER 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   924
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   925
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   926
    "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
   927
    "Modified: / 13-03-2017 / 15:41:32 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   928
    "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
   929
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   930
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   931
enter:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   932
    "generate an 'entering method...'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   933
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   934
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   935
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   936
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   937
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   938
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   939
        severity:ENTER 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   940
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   941
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   942
    "Created: / 05-08-2019 / 21:06:16 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   943
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   944
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   945
error:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   946
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   947
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   948
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   949
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   950
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   951
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   952
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   953
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   954
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   955
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   956
    "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
   957
    "Modified: / 13-03-2017 / 15:35:29 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   958
    "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
   959
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   960
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   961
error:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   962
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   963
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   964
   "/ a quick rejector to avoid overhead in deployed apps
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   965
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   966
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   967
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   968
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   969
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   970
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   971
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   972
    "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
   973
    "Modified: / 13-03-2017 / 15:37:55 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   974
    "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
   975
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   976
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   977
error:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   978
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   979
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   980
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   981
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   982
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   983
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   984
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   985
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   986
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   987
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   988
    "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
   989
    "Modified: / 13-03-2017 / 15:39:12 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   990
    "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
   991
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   992
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   993
error:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   994
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   995
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   996
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   997
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   998
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   999
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1000
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1001
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1002
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1003
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1004
    "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
  1005
    "Modified: / 13-03-2017 / 15:41:37 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1006
    "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
  1007
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1008
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1009
error:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1010
    "generate an 'error'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1011
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1012
   "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1013
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1014
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1015
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1016
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1017
        severity:ERROR 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1018
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1019
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1020
    "Created: / 05-08-2019 / 21:06:02 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1021
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1022
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1023
fatal:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1024
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1025
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1026
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1027
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1028
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1029
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1030
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1031
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1032
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1033
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1034
    "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
  1035
    "Modified: / 13-03-2017 / 15:35:41 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1036
    "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
  1037
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1038
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1039
fatal:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1040
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1041
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1042
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1043
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1044
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1045
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1046
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1047
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1048
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1049
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1050
    "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
  1051
    "Modified: / 13-03-2017 / 15:37:58 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1052
    "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
  1053
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1054
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1055
fatal:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1056
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1057
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1058
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1059
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1060
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1061
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1062
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1063
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1064
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1065
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1066
    "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
  1067
    "Modified: / 13-03-2017 / 15:40:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1068
    "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
  1069
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1070
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1071
fatal:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1072
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1073
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1074
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1075
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1076
    
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1077
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1078
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1079
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1080
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1081
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1082
    "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
  1083
    "Modified: / 13-03-2017 / 15:41:40 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1084
    "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
  1085
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1086
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1087
fatal:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1088
    "generate a 'fatal'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1089
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1090
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1091
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1092
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1093
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1094
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1095
        severity:FATAL 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1096
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1097
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1098
    "Created: / 05-08-2019 / 21:05:52 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1099
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1100
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1101
info:message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1102
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1103
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1104
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1105
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1106
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1107
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1108
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1109
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1110
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1111
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1112
    "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
  1113
    "Modified: / 13-03-2017 / 15:35:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1114
    "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
  1115
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1116
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1117
info:format with:arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1118
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1119
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1120
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1121
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1122
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1123
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1124
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1125
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1126
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1127
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1128
    "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
  1129
    "Modified: / 13-03-2017 / 15:38:01 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1130
    "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
  1131
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1132
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1133
info:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1134
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1135
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1136
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1137
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1138
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1139
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1140
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1141
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1142
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1143
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1144
    "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
  1145
    "Modified: / 13-03-2017 / 15:40:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1146
    "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
  1147
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1148
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1149
info:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1150
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1151
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1152
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1153
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1154
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1155
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1156
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1157
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1158
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1159
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1160
    "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
  1161
    "Modified: / 13-03-2017 / 15:41:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1162
    "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
  1163
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1164
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1165
info:format with:arg1 with:arg2 with:arg3 with:arg4
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1166
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1167
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1168
    "/ a quick rejector to avoid overhead in deployed apps
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1169
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1170
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1171
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1172
        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
  1173
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1174
        originator:nil
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1175
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1176
    "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
  1177
    "Modified: / 13-03-2017 / 15:41:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1178
    "Modified (comment): / 24-05-2019 / 00:55:41 / Claus Gittinger"
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1179
!
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1180
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1181
info:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1182
    "generate an 'info'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1183
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1184
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1185
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1186
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1187
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1188
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1189
        severity:INFO 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1190
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1191
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1192
    "Created: / 05-08-2019 / 21:05:27 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1193
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1194
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1195
leave: message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1196
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1197
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1198
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1199
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1200
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1201
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1202
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1203
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1204
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1205
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1206
    "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
  1207
    "Modified: / 13-03-2017 / 15:36:02 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1208
    "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
  1209
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1210
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1211
leave: format with: arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1212
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1213
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1214
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1215
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1216
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1217
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1218
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1219
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1220
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1221
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1222
    "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
  1223
    "Modified: / 13-03-2017 / 15:38:05 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1224
    "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
  1225
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1226
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1227
leave: format with: arg1 with: arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1228
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1229
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1230
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1231
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1232
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1233
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1234
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1235
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1236
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1237
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1238
    "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
  1239
    "Modified: / 13-03-2017 / 15:40:32 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1240
    "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
  1241
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1242
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1243
leave: format with: arg1 with: arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1244
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1245
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1246
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1247
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1248
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1249
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1250
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1251
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1252
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1253
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1254
    "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
  1255
    "Modified: / 13-03-2017 / 15:42:06 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1256
    "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
  1257
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1258
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1259
leave: format withArguments: arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1260
    "generate a 'leaving method...'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1261
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1262
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1263
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1264
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1265
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1266
        log:(self expand:format withArguments: arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1267
        severity:LEAVE 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1268
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1269
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1270
    "Created: / 05-08-2019 / 21:06:38 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1271
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1272
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1273
log:message 
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1274
    self debug:message
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
    "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
  1277
    "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
  1278
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1279
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1280
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1281
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1282
log:message with:arg
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1283
    self debug:message with:arg
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
    "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
  1286
    "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
  1287
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1288
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1289
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1290
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1291
log:message with:arg1 with:arg2
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1292
    self debug:message with:arg1 with:arg2
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
    "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
  1295
    "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
  1296
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1297
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1298
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1299
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1300
log:message with:arg1 with:arg2 with:arg3
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1301
    self debug:message with:arg1 with:arg2 with:arg3
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
    "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
  1304
    "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
  1305
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1306
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1307
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1308
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1309
log:message withArguments:args
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1310
    self debug:message withArguments: args
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1311
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1312
    "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
  1313
    "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
  1314
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1315
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1316
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1317
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1318
trace0: message
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1319
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1320
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1321
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1322
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1323
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1324
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1325
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1326
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1327
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1328
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1329
    "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
  1330
    "Modified: / 13-03-2017 / 15:36:15 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1331
    "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
  1332
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1333
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1334
trace0: format with: arg1
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1335
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1336
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1337
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1338
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1339
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1340
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1341
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1342
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1343
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1344
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1345
    "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
  1346
    "Modified: / 13-03-2017 / 15:38:09 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1347
    "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
  1348
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1349
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1350
trace0: format with: arg1 with: arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1351
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1352
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1353
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1354
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1355
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1356
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1357
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1358
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1359
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1360
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1361
    "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
  1362
    "Modified: / 13-03-2017 / 15:40:35 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1363
    "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
  1364
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1365
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1366
trace0: format with: arg1 with: arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1367
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1368
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1369
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1370
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1371
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1372
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1373
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1374
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1375
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1376
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1377
    "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
  1378
    "Modified: / 13-03-2017 / 15:42:09 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1379
    "Modified: / 24-05-2019 / 00:56:58 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1380
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1381
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1382
trace1: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1383
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1384
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1385
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1386
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1387
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1388
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1389
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1390
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1391
    "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
  1392
    "Modified: / 13-03-2017 / 15:36:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1393
    "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
  1394
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1395
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1396
trace1: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1397
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1398
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1399
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1400
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1401
        log:(self expand:format with:arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1402
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1403
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1404
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1405
    "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
  1406
    "Modified: / 13-03-2017 / 15:38:13 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1407
    "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
  1408
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1409
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1410
trace1: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1411
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1412
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1413
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1414
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1415
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1416
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1417
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1418
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1419
    "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
  1420
    "Modified: / 13-03-2017 / 15:40:40 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1421
    "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
  1422
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1423
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1424
trace1: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1425
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1426
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1427
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1428
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1429
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1430
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1431
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1432
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1433
    "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
  1434
    "Modified: / 13-03-2017 / 15:42:14 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1435
    "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
  1436
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1437
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1438
trace2: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1439
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1440
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1441
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1442
    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
  1443
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1444
    "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
  1445
    "Modified: / 13-03-2017 / 15:36:34 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1446
    "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
  1447
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1448
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1449
trace2: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1450
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1451
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1452
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1453
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1454
        log: (self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1455
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1456
        originator: nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1457
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1458
    "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
  1459
    "Modified: / 13-03-2017 / 15:38:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1460
    "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
  1461
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1462
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1463
trace2: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1464
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1465
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1466
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1467
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1468
        log: (self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1469
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1470
        originator: nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1471
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1472
    "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
  1473
    "Modified: / 13-03-2017 / 15:40:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1474
    "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
  1475
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1476
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1477
trace2: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1478
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1479
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1480
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1481
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1482
        log: (self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1483
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1484
        originator: nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1485
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1486
    "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
  1487
    "Modified: / 13-03-2017 / 15:42:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1488
    "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
  1489
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1490
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1491
trace3: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1492
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1493
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1494
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1495
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1496
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1497
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1498
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1499
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1500
    "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
  1501
    "Modified: / 13-03-2017 / 15:36:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1502
    "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
  1503
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1504
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1505
trace3: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1506
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1507
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1508
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1509
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1510
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1511
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1512
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1513
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1514
    "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
  1515
    "Modified: / 13-03-2017 / 15:38:19 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1516
    "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
  1517
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1518
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1519
trace3: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1520
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1521
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1522
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1523
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1524
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1525
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1526
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1527
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1528
    "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
  1529
    "Modified: / 13-03-2017 / 15:40:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1530
    "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
  1531
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1532
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1533
trace3: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1534
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1535
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1536
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1537
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1538
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1539
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1540
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1541
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1542
    "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
  1543
    "Modified: / 13-03-2017 / 15:42:20 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1544
    "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
  1545
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1546
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1547
trace: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1548
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1549
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1550
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1551
    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
  1552
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1553
    "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
  1554
    "Modified: / 13-03-2017 / 15:36:55 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1555
    "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
  1556
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1557
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1558
trace: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1559
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1560
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1561
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1562
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1563
        log:(self expand:format with:arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1564
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1565
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1566
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1567
    "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
  1568
    "Modified: / 13-03-2017 / 15:38:29 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1569
    "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
  1570
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1571
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1572
trace: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1573
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1574
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1575
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1576
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1577
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1578
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1579
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1580
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1581
    "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
  1582
    "Modified: / 13-03-2017 / 15:40:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1583
    "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
  1584
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1585
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1586
trace: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1587
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1588
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1589
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1590
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1591
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1592
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1593
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1594
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1595
    "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
  1596
    "Modified: / 13-03-2017 / 15:42:24 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1597
    "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
  1598
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1599
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1600
trace: format withArguments: arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1601
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1602
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1603
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1604
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1605
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1606
        severity:TRACE 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1607
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1608
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1609
    "Created: / 05-08-2019 / 21:07:13 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1610
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1611
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1612
warning:message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1613
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1614
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1615
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1616
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1617
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1618
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1619
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1620
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1621
    "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
  1622
    "Modified: / 13-03-2017 / 15:37:05 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1623
    "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
  1624
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1625
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1626
warning:format with:arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1627
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1628
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1629
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1630
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1631
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1632
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1633
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1634
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1635
    "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
  1636
    "Modified: / 13-03-2017 / 15:38:31 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1637
    "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
  1638
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1639
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1640
warning:format with:arg1 with:arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1641
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1642
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1643
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1644
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1645
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1646
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1647
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1648
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1649
    "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
  1650
    "Modified: / 13-03-2017 / 15:40:54 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1651
    "Modified: / 24-05-2019 / 00:49:52 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1652
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1653
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1654
warning:format with:arg1 with:arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1655
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1656
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1657
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1658
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1659
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1660
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1661
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1662
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1663
    "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
  1664
    "Modified: / 13-03-2017 / 15:42:27 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1665
    "Modified: / 24-05-2019 / 00:49:56 / Claus Gittinger"
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1666
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1667
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1668
warning:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1669
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1670
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1671
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1672
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1673
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1674
        severity:WARN 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1675
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1676
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1677
    "Created: / 05-08-2019 / 21:06:54 / Stefan Vogel"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1678
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1679
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1680
!MiniLogger class methodsFor:'private'!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1681
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1682
basicLog: message severity: severity facility: facility originator: originator attachment: attachment
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
  1683
    "Principal logging method. This mimics VM's __stxLog__()"
23148
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
    |messageAsSent|
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1686
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
  1687
    (LogOnStderr not or:[Stderr isNil]) ifTrue:[
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1688
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1689
    ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1690
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1691
    messageAsSent := 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1692
            self logFormat
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1693
                bindWith:(facility ? 'STX')
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1694
                with:severity name
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1695
                with:(Timestamp now printStringFormat:(self timestampFormat))
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1696
                with:originator
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1697
                with:message.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1698
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1699
    "/ 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
  1700
    "/ we have to recode the message using locale-specific encoding
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1701
    Stderr isExternalStream ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1702
        messageAsSent := messageAsSent string.  "take care of Texts"
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
  1703
        messageAsSent := OperatingSystem encodeTerminalOutput:messageAsSent.
25135
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1704
        messageAsSent _errorPrintCR.
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1705
"/        [
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1706
"/            Stderr nextPutLine: messageAsSent
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1707
"/        ] on:StreamError do:[:ex|
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1708
"/            'STX:Logger [error]: error writing to stream: ' _errorPrint. ex description _errorPrintCR.
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1709
"/            messageAsSent _errorPrintCR.
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1710
"/        ].
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1711
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1712
    ].
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
    Stderr nextPutLine: messageAsSent
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1715
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1716
    "Created: / 28-06-2018 / 11:05:17 / Stefan Vogel"
23572
75f7f0f297a2 #BUGFIX by sr
sr
parents: 23200
diff changeset
  1717
    "Modified: / 20-12-2018 / 12:33:00 / sr"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1718
!
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1719
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1720
expand:message
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1721
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1722
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1723
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1724
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1725
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1726
    "Created: / 13-03-2017 / 15:34:47 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1727
!
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
expand:message addingInfoFrom:aContext to:aDictionary
21682
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1730
    |messageString mthd rcvr methodWho|
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1731
    
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1732
    (messageString := message) isString ifFalse:[
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1733
        messageString := message value asString.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1734
        messageString isString ifFalse:[ ^ messageString asString].
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1735
    ].
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
    mthd := aContext method.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1738
    rcvr := aContext receiver.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1739
    methodWho := mthd whoString.
21681
08cdd57378f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 21644
diff changeset
  1740
    
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1741
    aDictionary at:'LINE' put:(aContext lineNumber).
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1742
    aDictionary at:'RECEIVER' put:[rcvr displayString].
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1743
    aDictionary at:'CLASS' put:(rcvr class name).
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1744
    aDictionary at:'MCLASS' put:(mthd mclass displayString).
24133
e53dd957676b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24132
diff changeset
  1745
    aDictionary at:'SELECTOR' put:(mthd selector ? 'doIt').
21682
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1746
    aDictionary at:'WHO' put:methodWho.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1747
    aDictionary at:'WHERE' put:(methodWho,'@',aContext lineNumber printString).
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1748
    ^ messageString expandPlaceholdersWith:aDictionary
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1749
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1750
    "
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1751
     Logger warning:'some problem with %(RECEIVER)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1752
     Logger warning:'some problem with %(RECEIVER) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1753
     Logger warning:'some problem with %(CLASS) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1754
     Logger warning:'some problem with %(MCLASS) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1755
     Logger warning:'some problem with %(SELECTOR) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1756
     Logger warning:'some problem with %(WHERE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1757
    "
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1758
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1759
    "Created: / 13-03-2017 / 15:46:52 / cg"
21741
02a8a0495313 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 21682
diff changeset
  1760
    "Modified: / 03-05-2017 / 15:38:35 / cg"
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1761
    "Modified: / 05-06-2019 / 21:06:40 / Claus Gittinger"
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1762
    "Modified (comment): / 06-06-2019 / 09:05:07 / Claus Gittinger"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1763
!
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
expand:message with:arg1
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1766
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1767
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1768
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1769
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1770
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1771
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1772
    "Created: / 13-03-2017 / 15:37:25 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1773
!
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
expand:message with:arg1 with:arg2
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1776
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1777
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1778
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1779
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1780
    d at:2 put:arg2.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1781
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1782
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1783
    "Created: / 13-03-2017 / 15:38:50 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1784
!
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
expand:message with:arg1 with:arg2 with:arg3
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1787
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1788
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1789
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1790
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1791
    d at:2 put:arg2.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1792
    d at:3 put:arg3.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1793
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1794
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1795
    "Created: / 13-03-2017 / 15:41:05 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1796
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1797
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1798
expand:message with:arg1 with:arg2 with:arg3 with:arg4
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1799
    |d|
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1800
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1801
    d := Dictionary new.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1802
    d at:1 put:arg1.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1803
    d at:2 put:arg2.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1804
    d at:3 put:arg3.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1805
    d at:4 put:arg4.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1806
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1807
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1808
    "Created: / 13-03-2017 / 15:41:05 / cg"
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1809
!
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1810
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1811
expand:message withArguments:args
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1812
    |d|
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1813
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1814
    d := Dictionary new.
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1815
    args keysAndValuesDo:[:eachIdx :eachArg|
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1816
        d at:eachIdx put:eachArg.
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1817
    ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1818
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1819
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1820
    "Created: / 05-08-2019 / 21:02:55 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1821
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1822
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1823
facilityOf:originator 
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1824
    originator isProtoObject ifTrue:[
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1825
        ^ originator class logFacility.
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1826
    ].
24141
e3c4af5e8b20 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 24139
diff changeset
  1827
    ^ originator logFacility
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1828
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1829
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1830
"/    ^ originator class
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1831
"/        perform:#logFacility
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1832
"/        ifNotUnderstood:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1833
"/            |pkg|
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1834
"/
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1835
"/            pkg := originator class package.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1836
"/            (pkg startsWith:'stx') ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1837
"/                'STX'
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1838
"/            ] ifFalse:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1839
"/                pkg copyFrom:((pkg lastIndexOf:$:) + 1)
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1840
"/            ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1841
"/        ]
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1842
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1843
    "
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1844
     Logger facilityOf: Object
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1845
     Logger facilityOf: Expecco::Browser
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1846
    "
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1847
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1848
    "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
  1849
    "Modified: / 01-03-2017 / 10:43:23 / cg"
24141
e3c4af5e8b20 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 24139
diff changeset
  1850
    "Modified: / 24-05-2019 / 01:04:34 / Claus Gittinger"
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1851
    "Modified: / 28-05-2019 / 13:07:06 / Stefan Vogel"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1852
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1853
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1854
severityThresholdOf:originator
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1855
    "allow each class to define an individual threshold for Logging"
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1856
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1857
    |cls t|
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1858
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1859
    cls := originator class.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1860
    ThresholdPerClass notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1861
        t := ThresholdPerClass at:(cls theNonMetaclass name) ifAbsent:nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1862
        t notNil ifTrue:[^ t].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1863
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1864
    ThresholdPerPackage notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1865
        t := ThresholdPerPackage at:(cls package) ifAbsent:nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1866
        t notNil ifTrue:[^ t].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1867
    ].
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
    "/ disabled; the above scheme is better...
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1870
    "/ ^ cls 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1871
    "/    perform:#logSeverityThreshold
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1872
    "/     ifNotUnderstood:[ ^ Threshold ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1873
    ^ Threshold
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1874
    
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1875
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1876
     Logger severityThresholdOf: Object
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1877
     Logger severityThresholdOf: Expecco::Browser
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1878
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1879
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1880
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1881
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1882
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1883
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1884
    "
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
    "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
  1887
    "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
  1888
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1889
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1890
!MiniLogger class methodsFor:'queries'!
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1891
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1892
canLog
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1893
    "answer true, if logging can be performed. Subclasse may redefine this."
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1894
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1895
    ^ (LogOnStderr and:[Stderr notNil])
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1896
       or:[LogOnTranscript and:[Transcript isView]].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1897
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1898
    "Created: / 28-06-2018 / 10:47:29 / Stefan Vogel"
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1899
! !
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1900
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1901
!MiniLogger::Severity methodsFor:'accessing'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1902
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1903
name
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1904
    ^ name
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1905
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1906
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1907
value
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
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1910
21796
25b71e5e33b6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21741
diff changeset
  1911
!MiniLogger::Severity methodsFor:'arithmetic'!
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1912
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1913
+ aNumber
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1914
    |next|
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1915
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1916
    next := value + aNumber.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1917
    aNumber negative ifTrue:[
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1918
        ^ 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
  1919
    ].
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
    ^ 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
  1922
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
        MiniLogger severityINFO + 1
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1925
        MiniLogger severityTRACE to:MiniLogger severityFATAL do:[:each| Transcript showCR:each].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1926
        MiniLogger severityFATAL downTo:MiniLogger severityTRACE do:[:each| Transcript showCR:each].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1927
    "
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
!MiniLogger::Severity methodsFor:'comparing'!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1931
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1932
< aSeverity
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1933
    ^ value < aSeverity value
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1934
!
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
= aSeverity
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1937
    ^ self == aSeverity or:[value = aSeverity value]
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1938
!
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
hash
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1941
    "instances, for which #= answers true must answer the same hash"
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1942
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1943
    ^ value hash
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1944
! !
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1945
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1946
!MiniLogger::Severity methodsFor:'initialization'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1947
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1948
initializeWithName: aString value: anInteger
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1949
    name := aString.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1950
    value := anInteger
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1951
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1952
    "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
  1953
! !
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
!MiniLogger::Severity methodsFor:'printing & storing'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1956
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1957
displayOn:aStream
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1958
    "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
  1959
     for developers "
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1960
24129
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1961
    name printOn:aStream.
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1962
    aStream nextPutAll:':'.
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1963
    value printOn:aStream.
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1964
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1965
    "Created: / 22-05-2019 / 19:24:12 / Claus Gittinger"
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1966
!
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
printOn:aStream
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1969
    "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
  1970
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1971
    name printOn:aStream.
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1972
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1973
    "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
  1974
    "Modified: / 22-05-2019 / 19:24:16 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1975
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1976
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1977
!MiniLogger class methodsFor:'documentation'!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1978
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1979
version
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  1980
    ^ '$Header$'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1981
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1982
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1983
version_CVS
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  1984
    ^ '$Header$'
14881
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1985
!
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
version_HG
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1988
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1989
    ^ '$Changeset: <not expanded> $'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1990
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1991
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1992
version_SVN
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  1993
    ^ '$Id$'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1994
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1995
14881
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  1996
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1997
MiniLogger initialize!