MiniLogger.st
author Stefan Vogel <sv@exept.de>
Tue, 28 Apr 2020 16:21:34 +0200
changeset 25373 f030619565e1
parent 25309 3880cfe5fb36
permissions -rw-r--r--
#REFACTORING by stefan class: ArrayedCollection class changed: #with:
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
25308
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
    23
		TimestampFormat WARN WARNING DebugIfLogGenerated'
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
25308
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   417
debugIfLogGenerated
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   418
    "if true, a break is generated whenever a log is generated."
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   419
    
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   420
    ^ DebugIfLogGenerated ? false
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   421
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   422
    "
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   423
     self loggingThreshold:INFO.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   424
     self debugIfLogGenerated:true.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   425
     self info:'blabla'.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   426
     self debugIfLogGenerated:false.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   427
     self info:'blabla'.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   428
    "
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   429
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   430
    "Created: / 13-08-2014 / 14:36:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   431
!
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   432
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   433
debugIfLogGenerated:aBoolean
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   434
    "if true, a break is generated whenever a log is generated."
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   435
    
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   436
    DebugIfLogGenerated := aBoolean
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   437
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   438
    "
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   439
     self loggingThreshold:INFO.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   440
     self debugIfLogGenerated:true.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   441
     self info:'blabla'.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   442
     self debugIfLogGenerated:false.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   443
     self info:'blabla'.
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   444
    "
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   445
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   446
    "Created: / 13-08-2014 / 14:36:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   447
!
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
   448
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   449
loggingThreshold
22710
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   450
    "Return the logging threshold. 
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   451
     No messages with severity lower than threshold will be logged.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   452
     The default is 
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   453
        InfoPrinting ifTrue:[INFO] ifFalse:[WARN]
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   454
     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
   455
    
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   456
    ^ Threshold
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   457
22710
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   458
    "
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   459
     self loggingThreshold:INFO.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   460
     self trace:'blabla'.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   461
     self loggingThreshold:TRACE.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   462
     self trace:'blabla'.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   463
     self loggingThreshold:INFO.
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   464
    "
731015dd01c5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 22505
diff changeset
   465
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   466
    "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
   467
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   468
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   469
loggingThreshold:severity 
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   470
    "Sets logging threshold. 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   471
     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
   472
     Use `Logger severityNONE` to suppress logging completely 
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   473
     or `Logger severityALL` to log all messages.
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   474
     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
   475
    
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   476
    (
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   477
        (Severities includes:severity) 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   478
        or:[ severity == ALL or:[ severity == NONE ] ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   479
    ) ifFalse:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   480
        self error:'Invalid severity. Use of Logger severityXXX'.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   481
        ^ self.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   482
    ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   483
    Threshold := severity
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   484
16895
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   485
    "
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   486
    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
   487
    Logger loggingThreshold: Logger severityINFO.
23669
27c60ac0dcdb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23572
diff changeset
   488
    Logger loggingThreshold: Logger severityDEBUG.  -- only debug, warnings and errors 
27c60ac0dcdb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23572
diff changeset
   489
    Logger loggingThreshold: Logger severityWARN.   -- only warnings and errors 
27c60ac0dcdb #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23572
diff changeset
   490
    Logger loggingThreshold: Logger severityERROR.  -- only errors
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   491
    
20485
8eb2274f91ae #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20218
diff changeset
   492
    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
   493
    "
df368a381d23 Allow for passing a block instead of a String as message.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16856
diff changeset
   494
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   495
    "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
   496
    "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
   497
    "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
   498
    "Modified (comment): / 01-03-2017 / 10:42:31 / cg"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   499
    "Modified (comment): / 06-02-2019 / 18:17:57 / Claus Gittinger"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   500
!
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   501
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   502
loggingThreshold:aLimitOrNil forClass:aClass
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   503
    "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
   504
     With a nil limit, the default is reinstalled for that class.
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   505
     ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   506
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   507
    "/ the original scheme asked the class;
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   508
    "/ but that required adding a getter to debugged classes, which
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   509
    "/ is easily forgotten and checked in.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   510
    "/ 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
   511
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   512
    "/ 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
   513
    aLimitOrNil isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   514
        ThresholdPerClass notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   515
            ThresholdPerClass removeKey:(aClass theNonMetaclass name) ifAbsent:[].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   516
            ThresholdPerClass isEmpty ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   517
                ThresholdPerClass := nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   518
            ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   519
        ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   520
        ^ self
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   521
    ].    
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   522
    ThresholdPerClass isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   523
        ThresholdPerClass := Dictionary new.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   524
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   525
    ThresholdPerClass at:aClass theNonMetaclass name put:aLimitOrNil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   526
21609
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   527
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   528
     Logger severityThresholdOf: Object
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   529
     Logger severityThresholdOf: Expecco::Browser
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   530
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   531
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   532
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   533
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'exept:workflow'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   534
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   535
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   536
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   537
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   538
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   539
    "Created: / 01-03-2017 / 10:52:25 / cg"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   540
    "Modified (comment): / 06-02-2019 / 18:18:03 / Claus Gittinger"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   541
!
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   542
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   543
loggingThreshold:aLimitOrNil forPackage:aPackageName
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   544
    "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
   545
     With a nil limit, the default is reinstalled for that class.
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   546
     ALL > FATAL > ERROR > WARN > INFO > DEBUG > TRACE0 > TRACE3 > NONE"
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   547
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   548
    "/ the original scheme only asked the class;
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   549
    "/ but that required adding many getters to debugged packages, 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   550
    "/ which are easily forgotten and checked in.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   551
    "/ 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
   552
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   553
    "/ 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
   554
    aLimitOrNil isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   555
        ThresholdPerPackage notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   556
            ThresholdPerPackage removeKey:(aPackageName) ifAbsent:[].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   557
            ThresholdPerPackage isEmpty ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   558
                ThresholdPerPackage := nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   559
            ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   560
        ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   561
        ^ self
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   562
    ].    
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   563
    ThresholdPerPackage isNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   564
        ThresholdPerPackage := Dictionary new.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   565
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   566
    ThresholdPerPackage at:aPackageName put:aLimitOrNil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   567
21609
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   568
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   569
     Logger severityThresholdOf: Object
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   570
     Logger severityThresholdOf: Expecco::Browser
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   571
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   572
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   573
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   574
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'exept:workflow'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   575
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   576
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   577
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   578
    "
34d4dda50ad5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21608
diff changeset
   579
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
   580
    "Created: / 01-03-2017 / 10:53:42 / cg"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   581
    "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
   582
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   583
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   584
!MiniLogger class methodsFor:'logging - basic'!
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   585
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   586
log:message facility:facility 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   587
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   588
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   589
        severity:DEBUG
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   590
        facility:facility
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   591
        originator:(thisContext sender receiver)
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
    "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
   594
    "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
   595
    "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
   596
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   597
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   598
log:message severity:severity 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   599
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   600
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   601
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   602
        originator:(thisContext sender receiver)
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
    "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
   605
    "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
   606
    "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
   607
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   608
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   609
log:message severity:severity attachment:attachment 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   610
    |originator|
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   611
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   612
    originator := thisContext sender receiver.
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   613
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   614
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   615
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   616
        facility:(self facilityOf:originator)
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   617
        originator:originator
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   618
        attachment:attachment
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   619
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   620
    "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
   621
    "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
   622
    "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
   623
    "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
   624
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   625
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   626
log:message severity:severity facility:facility 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   627
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   628
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   629
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   630
        facility:facility
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   631
        originator:thisContext sender receiver
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   632
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   633
    "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
   634
    "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
   635
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   636
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   637
log:message severity:severity facility:facility originator:originator 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   638
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   639
        log:message
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   640
        severity:severity
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   641
        facility:facility
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   642
        originator:originator
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   643
        attachment:nil
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   644
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   645
    "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
   646
    "Modified (format): / 24-05-2019 / 00:25:09 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   647
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   648
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   649
log:message severity:severityOrSymbol facility:facilityArg originator:originator attachment:attachment
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
   650
    "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
   651
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   652
    | 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
   653
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   654
    (self canLog) ifFalse:[^ self].
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   655
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   656
    severity := severityOrSymbol.
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   657
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   658
    severity isSymbol ifTrue:[
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   659
        "/ Be backward compatible, allow for symbolic severities
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   660
        "/ but when encountered, issue a warning...
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   661
        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
   662
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   663
        "/ This will be enabled later, so far it generates
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   664
        "/ 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
   665
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   666
        "/ 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
   667
        "/ caller := thisContext sender.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   668
        "/ [ caller notNil and: [ caller receiver ~~ originator ] ] whileTrue:[ caller := caller sender ].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   669
        "/ 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
   670
    ] ifFalse:[
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   671
        "/ 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
   672
        "/ if not, issue an error
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   673
        (Severities includesIdentical:severity) ifFalse:[ 
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   674
            | caller |
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   675
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   676
            caller := thisContext sender.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   677
            [caller notNil and:[caller receiver ~~ originator]] whileTrue:[ 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   678
                caller := caller sender
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   679
            ].
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   680
            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
   681
                 severity: ERROR facility: 'STX' originator: self.
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   682
            severity := INFO.
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   683
        ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   684
    ].
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   685
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   686
    messageXlated := message value asString.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   687
    facility := facilityArg.
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   688
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   689
    "/ hack to allow calls from #infoPrint/#errorPrint.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   690
    "/ 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
   691
    words := messageXlated asCollectionOfWords.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   692
    (words size >= 2
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   693
     and:[words first isAlphaNumeric
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   694
     and:[((secondWord := words second) startsWith:$[ )
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   695
     and:[(secondWord endsWith:$]) or:[(secondWord endsWith:']:')]]]]) ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   696
        facility := words first.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   697
        severityName := secondWord copyFrom:2 to:(secondWord indexOf:$])-1.
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   698
        severity := Severities detect:[:each| each name = severityName] 
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   699
                                     ifNone:[Severity new 
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   700
                                                initializeWithName:severityName 
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   701
                                                value:severityOrSymbol value].
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   702
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   703
        messageXlated := messageXlated copyFrom:(messageXlated indexOf:$])+1.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   704
        (messageXlated startsWith:$:) ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   705
            messageXlated := messageXlated copyFrom:2.
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   706
        ].
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   707
        (messageXlated startsWith:Character space) ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   708
            messageXlated := messageXlated copyFrom:2.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   709
        ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   710
    ].
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   711
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   712
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   713
    (ThresholdPerClass isNil and:[ThresholdPerPackage isNil]) ifTrue:[
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   714
        (Threshold > severity) ifTrue:[ ^ self ].
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   715
    ] ifFalse:[
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   716
        ((self severityThresholdOf:originator) > severity) ifTrue:[^ self ].  
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   717
    ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   718
    
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   719
    thisContext isRecursive ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   720
        'STX:Logger [error]: recursive logger invocation.' _errorPrintCR.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   721
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   722
    ].
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   723
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   724
    "/ to avoid recursion, turn off logOnTranscript while logging
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   725
    "/ had this problem with RecursionLock, which wanted to issue a warning
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   726
    "/ ("cleanup for dead process") from inside Transcript code.
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   727
    prevLogOnTranscript := LogOnTranscript.
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   728
    [
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   729
        LogOnTranscript := false.
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   730
        
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   731
        self basicLog:messageXlated severity:severity facility:facility 
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   732
             originator:originator attachment:attachment.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   733
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   734
        (prevLogOnTranscript and:[Transcript isView]) ifTrue:[
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   735
            |msg|
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   736
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   737
            msg := '%1 [%2]: %3'
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   738
                        bindWith:facility
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   739
                        with:severity
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   740
                        with:messageXlated.
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   741
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   742
            severity >= WARNING ifTrue:[
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   743
                severity >= ERROR ifTrue:[
24830
f31adcad8aed #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24829
diff changeset
   744
                    severity >= FATAL ifTrue:[
f31adcad8aed #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24829
diff changeset
   745
                        msg := msg withColor:Color red darkened.
f31adcad8aed #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24829
diff changeset
   746
                    ] ifFalse:[
f31adcad8aed #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24829
diff changeset
   747
                        msg := msg withColor:Color red.
f31adcad8aed #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24829
diff changeset
   748
                    ].
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   749
                ] ifFalse:[
25212
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   750
                    msg := msg withColor:Color orange slightlyDarkened.
24829
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   751
                ].
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   752
            ].
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   753
dc443836dfef #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 24776
diff changeset
   754
            Transcript nextPutLine:msg.
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   755
        ].
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   756
    ] ensure:[
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   757
        LogOnTranscript := prevLogOnTranscript.
20504
55cf60d4118e #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 20492
diff changeset
   758
    ].
20732
8407d1b888f3 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20631
diff changeset
   759
    
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   760
    "
25212
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   761
     Logger info:'some info'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   762
     Logger warning:'some warning'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   763
     Logger error:'some error'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   764
     Logger debug:'some debug'
af30e58b9fad #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 25135
diff changeset
   765
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   766
     Logger log:'test message' severity:self severityINFO facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   767
     Logger log:'test message' severity:#info facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   768
     Logger log:'test message' severity:#bla facility: 'TEST'
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
   769
     Logger log:'test message' severity:123 facility: 'TEST'
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   770
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   771
     Logger log:'test message' severity: DEBUG facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   772
     Logger log:'test message' severity: INFO facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   773
     Logger log:'test message' asUnicode16String severity: INFO facility: 'TEST'
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
   774
     Logger log:'test message äöüß' severity: INFO facility: 'TEST'
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   775
     Logger log:'test message' severity: WARNING facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   776
     Logger log:'test message' severity: ERROR facility: 'TEST'
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   777
     'test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   778
     'test message' errorPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   779
    "
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   780
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   781
    "backward compatibility with infoPrint/errorPrint callers:
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   782
     'foo [info] test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   783
     'bar [error] test message' errorPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   784
     'foo [info]: test message' infoPrintCR
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   785
     'bar [error]: test message' errorPrintCR
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   786
    "
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   787
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   788
    "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
   789
    "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
   790
    "Modified: / 01-03-2017 / 11:15:46 / cg"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
   791
    "Modified: / 28-06-2018 / 11:15:42 / Stefan Vogel"
23200
43417d0ac3f2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 23148
diff changeset
   792
    "Modified: / 10-07-2018 / 00:16:35 / Claus Gittinger"
23671
bb9ad1ca0117 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 23669
diff changeset
   793
    "Modified (format): / 06-02-2019 / 18:12:24 / Claus Gittinger"
24103
759b7342d559 #BUGFIX by Stefan Reise
sr
parents: 24020
diff changeset
   794
    "Modified: / 02-05-2019 / 13:50:07 / Stefan Reise"
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   795
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   796
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   797
log:message severity:severity originator:originatorOrNil
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   798
    |originator|
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   799
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   800
    (originator := originatorOrNil) isNil ifTrue:[
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   801
        originator := thisContext sender.
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   802
        [originator notNil and:[originator receiver == self]] whileTrue:[
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   803
            originator := originator sender
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   804
        ].
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   805
        originator notNil ifTrue:[ originator := originator receiver ].
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   806
    ].    
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   807
    self 
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   808
        log:message
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   809
        severity:severity
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   810
        facility:(self facilityOf:originator)
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   811
        originator:originator
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
   812
        attachment:nil
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   813
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
   814
    "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
   815
    "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
   816
    "Modified (format): / 24-05-2019 / 00:49:05 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   817
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
   818
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   819
!MiniLogger class methodsFor:'logging - utils'!
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:message
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:message) 
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:19 / 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:32:39 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   834
    "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
   835
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   836
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   837
debug:format with:arg1
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   847
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   848
    "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
   849
    "Modified (format): / 13-03-2017 / 15:37:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   850
    "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
   851
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   852
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   853
debug:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   854
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   855
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   856
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   857
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   858
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   859
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   860
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   861
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   862
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   863
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   864
    "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
   865
    "Modified: / 13-03-2017 / 15:39:04 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   866
    "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
   867
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   868
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   869
debug:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   870
    "generate a 'debug'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   871
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   872
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   873
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   874
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   875
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   876
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   877
        severity:DEBUG 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   878
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   879
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   880
    "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
   881
    "Modified: / 13-03-2017 / 15:41:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   882
    "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
   883
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   884
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   885
debug:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   886
    "generate a 'debug'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   887
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   888
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   889
    ((Threshold > DEBUG) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   890
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   891
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   892
        log:(self expand:format withArguments: arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   893
        severity:DEBUG 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   894
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   895
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   896
    "Created: / 05-08-2019 / 21:06:26 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   897
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   898
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   899
enter:message
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:message) 
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:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   911
    "Modified: / 13-03-2017 / 15:35:15 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   912
    "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
   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
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) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   923
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   924
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   925
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   926
    "Modified: / 02-12-2014 / 10:54:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   927
    "Modified: / 13-03-2017 / 15:37:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   928
    "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
   929
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   930
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   931
enter:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   932
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   933
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   934
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   935
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   936
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   937
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   938
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   939
        severity:ENTER 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   940
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   941
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
   942
    "Modified: / 02-12-2014 / 10:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   943
    "Modified: / 13-03-2017 / 15:39:07 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   944
    "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
   945
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
   946
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   947
enter:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   948
    "generate an 'entering method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   949
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   950
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   951
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
   952
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   953
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   954
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   955
        severity:ENTER 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   956
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   957
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   958
    "Modified: / 02-12-2014 / 10:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
   959
    "Modified: / 13-03-2017 / 15:41:32 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   960
    "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
   961
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
   962
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   963
enter:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   964
    "generate an 'entering method...'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   965
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   966
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   967
    ((Threshold > ENTER) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   968
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   969
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   970
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   971
        severity:ENTER 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   972
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   973
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   974
    "Created: / 05-08-2019 / 21:06:16 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   975
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
   976
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
   977
error:message
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:message) 
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:41 / 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:35:29 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   990
    "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
   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
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
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
   996
   "/ a quick rejector to avoid overhead in deployed apps
21614
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1003
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1004
    "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
  1005
    "Modified: / 13-03-2017 / 15:37:55 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1006
    "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
  1007
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1008
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1009
error:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1010
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1011
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1012
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1013
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1014
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1015
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1016
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1017
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1018
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1019
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1020
    "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
  1021
    "Modified: / 13-03-2017 / 15:39:12 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1022
    "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
  1023
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1024
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1025
error:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1026
    "generate an 'error'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1027
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1028
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1029
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1030
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1031
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1032
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1033
        severity:ERROR 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1034
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1035
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1036
    "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
  1037
    "Modified: / 13-03-2017 / 15:41:37 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1038
    "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
  1039
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1040
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1041
error:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1042
    "generate an 'error'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1043
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1044
   "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1045
    ((Threshold > ERROR) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1046
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1047
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1048
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1049
        severity:ERROR 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1050
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1051
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1052
    "Created: / 05-08-2019 / 21:06:02 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1053
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1054
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1055
fatal:message
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:message) 
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:51 / 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:35:41 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1068
    "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
  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
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
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1074
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1075
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1081
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1082
    "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
  1083
    "Modified: / 13-03-2017 / 15:37:58 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1084
    "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
  1085
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1086
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1087
fatal:format with:arg1 with:arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1088
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1089
21614
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1090
    "/ a quick rejector to avoid overhead in deployed apps
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1091
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
a84ce930ffde #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21609
diff changeset
  1092
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1093
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1094
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1095
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1096
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1097
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1098
    "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
  1099
    "Modified: / 13-03-2017 / 15:40:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1100
    "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
  1101
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1102
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1103
fatal:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1104
    "generate a 'fatal'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1105
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1106
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1107
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1108
    
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1109
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1110
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1111
        severity:FATAL 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1112
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1113
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1114
    "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
  1115
    "Modified: / 13-03-2017 / 15:41:40 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1116
    "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
  1117
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1118
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1119
fatal:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1120
    "generate a 'fatal'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1121
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1122
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1123
    ((Threshold > FATAL) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1124
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1125
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1126
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1127
        severity:FATAL 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1128
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1129
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1130
    "Created: / 05-08-2019 / 21:05:52 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1131
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1132
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1133
info:message
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:message) 
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:01 / 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:35:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1146
    "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
  1147
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1148
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1149
info:format with:arg1
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1159
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1160
    "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
  1161
    "Modified: / 13-03-2017 / 15:38:01 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1162
    "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
  1163
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1164
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1165
info:format with:arg1 with:arg2
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
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1168
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1169
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1175
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1176
    "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
  1177
    "Modified: / 13-03-2017 / 15:40:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1178
    "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
  1179
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1180
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1181
info:format with:arg1 with:arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1182
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1183
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1184
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1185
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1186
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1187
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1188
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1189
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1190
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1191
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1192
    "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
  1193
    "Modified: / 13-03-2017 / 15:41:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1194
    "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
  1195
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1196
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1197
info:format with:arg1 with:arg2 with:arg3 with:arg4
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1198
    "generate an 'info'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1199
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1200
    "/ a quick rejector to avoid overhead in deployed apps
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1201
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1202
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1203
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1204
        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
  1205
        severity:INFO 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1206
        originator:nil
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1207
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1208
    "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
  1209
    "Modified: / 13-03-2017 / 15:41:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1210
    "Modified (comment): / 24-05-2019 / 00:55:41 / Claus Gittinger"
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1211
!
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1212
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1213
info:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1214
    "generate an 'info'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1215
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1216
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1217
    ((Threshold > INFO) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1218
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1219
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1220
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1221
        severity:INFO 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1222
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1223
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1224
    "Created: / 05-08-2019 / 21:05:27 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1225
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1226
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1227
leave: message
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:message) 
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:14 / 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:36:02 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1240
    "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
  1241
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1242
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1243
leave: format with: arg1
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1253
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1254
    "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
  1255
    "Modified: / 13-03-2017 / 15:38:05 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1256
    "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
  1257
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1258
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1259
leave: format with: arg1 with: arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1260
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1261
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1262
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1263
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1264
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1265
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1266
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1267
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1268
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1269
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1270
    "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
  1271
    "Modified: / 13-03-2017 / 15:40:32 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1272
    "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
  1273
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1274
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1275
leave: format with: arg1 with: arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1276
    "generate a 'leaving method...'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1277
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1278
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1279
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1280
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1281
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1282
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1283
        severity:LEAVE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1284
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1285
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1286
    "Modified: / 02-12-2014 / 10:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1287
    "Modified: / 13-03-2017 / 15:42:06 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1288
    "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
  1289
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1290
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1291
leave: format withArguments: arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1292
    "generate a 'leaving method...'-log"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1293
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1294
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1295
    ((Threshold > LEAVE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1296
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1297
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1298
        log:(self expand:format withArguments: arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1299
        severity:LEAVE 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1300
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1301
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1302
    "Created: / 05-08-2019 / 21:06:38 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1303
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1304
24776
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1305
log:message 
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1306
    self debug:message
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
    "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
  1309
    "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
  1310
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1311
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1312
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1313
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1314
log:message with:arg
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1315
    self debug:message with:arg
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
    "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
  1318
    "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
  1319
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1320
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1321
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1322
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1323
log:message with:arg1 with:arg2
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1324
    self debug:message with:arg1 with:arg2
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1325
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1326
    "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
  1327
    "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
  1328
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1329
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1330
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1331
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1332
log:message with:arg1 with:arg2 with:arg3
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1333
    self debug:message with:arg1 with:arg2 with:arg3
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1334
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1335
    "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
  1336
    "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
  1337
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1338
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1339
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1340
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1341
log:message withArguments:args
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1342
    self debug:message withArguments: args
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1343
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1344
    "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
  1345
    "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
  1346
    "Modified (format): / 01-03-2017 / 10:27:52 / cg"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1347
    "Modified (format): / 24-05-2019 / 00:38:21 / Claus Gittinger"
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1348
!
d375feebf938 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 24559
diff changeset
  1349
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1350
trace0: message
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:message) 
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:25 / 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:36:15 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1363
    "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
  1364
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1365
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1366
trace0: format with: arg1
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) 
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
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1376
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1377
    "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
  1378
    "Modified: / 13-03-2017 / 15:38:09 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1379
    "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
  1380
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1381
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1382
trace0: format with: arg1 with: arg2
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1383
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1384
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1385
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1386
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1387
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1388
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1389
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1390
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1391
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1392
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1393
    "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
  1394
    "Modified: / 13-03-2017 / 15:40:35 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1395
    "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
  1396
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1397
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1398
trace0: format with: arg1 with: arg2 with:arg3
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1399
    "generate a 'debug trace'-log"
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1400
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1401
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1402
    ((Threshold > TRACE0) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1403
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1404
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1405
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1406
        severity:TRACE0 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1407
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1408
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1409
    "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
  1410
    "Modified: / 13-03-2017 / 15:42:09 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1411
    "Modified: / 24-05-2019 / 00:56:58 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1412
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1413
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1414
trace1: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1415
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1416
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1417
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1418
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1419
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1420
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1421
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1422
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1423
    "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
  1424
    "Modified: / 13-03-2017 / 15:36:26 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1425
    "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
  1426
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1427
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1428
trace1: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1429
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1430
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1431
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1432
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1433
        log:(self expand:format with:arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1434
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1435
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1436
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1437
    "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
  1438
    "Modified: / 13-03-2017 / 15:38:13 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1439
    "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
  1440
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1441
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1442
trace1: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1443
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1444
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1445
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1446
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1447
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1448
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1449
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1450
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1451
    "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
  1452
    "Modified: / 13-03-2017 / 15:40:40 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1453
    "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
  1454
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1455
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1456
trace1: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1457
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1458
    ((Threshold > TRACE1) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1459
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1460
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1461
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1462
        severity:TRACE1 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1463
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1464
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1465
    "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
  1466
    "Modified: / 13-03-2017 / 15:42:14 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1467
    "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
  1468
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1469
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1470
trace2: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1471
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1472
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1473
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1474
    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
  1475
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1476
    "Modified: / 02-12-2014 / 10:55:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1477
    "Modified: / 13-03-2017 / 15:36:34 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1478
    "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
  1479
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1480
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1481
trace2: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1482
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1483
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1484
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1485
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1486
        log: (self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1487
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1488
        originator: nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1489
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1490
    "Modified: / 02-12-2014 / 10:55:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1491
    "Modified: / 13-03-2017 / 15:38:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1492
    "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
  1493
!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1494
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1495
trace2: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1496
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1497
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1498
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1499
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1500
        log: (self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1501
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1502
        originator: nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1503
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1504
    "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
  1505
    "Modified: / 13-03-2017 / 15:40:43 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1506
    "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
  1507
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1508
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1509
trace2: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1510
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1511
    ((Threshold > TRACE2) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1512
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1513
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1514
        log: (self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1515
        severity: TRACE2 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1516
        originator: nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1517
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1518
    "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
  1519
    "Modified: / 13-03-2017 / 15:42:17 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1520
    "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
  1521
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1522
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1523
trace3: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1524
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1525
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1526
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1527
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1528
        log:(self expand:message) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1529
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1530
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1531
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1532
    "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
  1533
    "Modified: / 13-03-2017 / 15:36:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1534
    "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
  1535
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1536
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1537
trace3: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1538
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1539
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1540
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1541
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1542
        log:(self expand:format with: arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1543
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1544
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1545
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1546
    "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
  1547
    "Modified: / 13-03-2017 / 15:38:19 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1548
    "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
  1549
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1550
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1551
trace3: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1552
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1553
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1554
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1555
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1556
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1557
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1558
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1559
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1560
    "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
  1561
    "Modified: / 13-03-2017 / 15:40:47 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1562
    "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
  1563
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1564
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1565
trace3: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1566
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1567
    ((Threshold > TRACE3) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1568
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1569
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1570
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1571
        severity:TRACE3 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1572
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1573
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1574
    "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
  1575
    "Modified: / 13-03-2017 / 15:42:20 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1576
    "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
  1577
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1578
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1579
trace: message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1580
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1581
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1582
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1583
    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
  1584
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1585
    "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
  1586
    "Modified: / 13-03-2017 / 15:36:55 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1587
    "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
  1588
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1589
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1590
trace: format with: arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1591
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1592
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1593
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1594
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1595
        log:(self expand:format with:arg1) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1596
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1597
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1598
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1599
    "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
  1600
    "Modified: / 13-03-2017 / 15:38:29 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1601
    "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
  1602
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1603
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1604
trace: format with: arg1 with: arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1605
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1606
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1607
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1608
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1609
        log:(self expand:format with:arg1 with:arg2) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1610
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1611
        originator:nil
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1612
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1613
    "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
  1614
    "Modified: / 13-03-2017 / 15:40:51 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1615
    "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
  1616
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1617
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1618
trace: format with: arg1 with: arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1619
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1620
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1621
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1622
    self 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1623
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1624
        severity:TRACE 
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1625
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1626
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1627
    "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
  1628
    "Modified: / 13-03-2017 / 15:42:24 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1629
    "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
  1630
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1631
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1632
trace: format withArguments: arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1633
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1634
    ((Threshold > TRACE) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1635
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1636
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1637
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1638
        severity:TRACE 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1639
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1640
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1641
    "Created: / 05-08-2019 / 21:07:13 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1642
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1643
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1644
warning:message
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1645
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1646
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1647
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1648
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1649
        log:(self expand:message) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1650
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1651
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1652
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1653
    "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
  1654
    "Modified: / 13-03-2017 / 15:37:05 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1655
    "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
  1656
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1657
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1658
warning:format with:arg1
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1659
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1660
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1661
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1662
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1663
        log:(self expand:format with:arg1) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1664
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1665
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1666
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1667
    "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
  1668
    "Modified: / 13-03-2017 / 15:38:31 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1669
    "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
  1670
!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1671
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1672
warning:format with:arg1 with:arg2
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1673
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1674
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1675
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1676
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1677
        log:(self expand:format with:arg1 with:arg2) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1678
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1679
        originator:nil
16856
dd0c453b908f Fix in MiniLogger (WARNING -> WARN)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16845
diff changeset
  1680
17171
fbca490b0b4c Prepend originator class name to log messages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17068
diff changeset
  1681
    "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
  1682
    "Modified: / 13-03-2017 / 15:40:54 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1683
    "Modified: / 24-05-2019 / 00:49:52 / Claus Gittinger"
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1684
!
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1685
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1686
warning:format with:arg1 with:arg2 with:arg3
21626
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1687
    "/ a quick rejector to avoid overhead in deployed apps
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1688
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
e4578e01f37f #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 21614
diff changeset
  1689
24138
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1690
    self 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1691
        log:(self expand:format with:arg1 with:arg2 with:arg3) 
e13cbd390593 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 24133
diff changeset
  1692
        severity:WARN 
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1693
        originator:nil
20487
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1694
371f3e3a0f3b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 20485
diff changeset
  1695
    "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
  1696
    "Modified: / 13-03-2017 / 15:42:27 / cg"
24139
83fefadcd091 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 24138
diff changeset
  1697
    "Modified: / 24-05-2019 / 00:49:56 / Claus Gittinger"
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1698
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1699
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1700
warning:format withArguments:arg1
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1701
    "/ a quick rejector to avoid overhead in deployed apps
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1702
    ((Threshold > WARN) and:[ThresholdPerClass isNil and:[ThresholdPerPackage isNil]]) ifTrue:[ ^ self ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1703
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1704
    self 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1705
        log:(self expand:format withArguments:arg1) 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1706
        severity:WARN 
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1707
        originator:nil
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1708
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1709
    "Created: / 05-08-2019 / 21:06:54 / Stefan Vogel"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1710
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1711
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1712
!MiniLogger class methodsFor:'private'!
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1713
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1714
basicLog: message severity: severity facility: facility originator: originator attachment: attachment
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
  1715
    "Principal logging method. This mimics VM's __stxLog__()"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1716
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1717
    |messageAsSent|
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1718
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
  1719
    (LogOnStderr not or:[Stderr isNil]) ifTrue:[
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1720
        ^ self.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1721
    ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1722
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1723
    messageAsSent := 
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1724
            self logFormat
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1725
                bindWith:(facility ? 'STX')
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1726
                with:severity name
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1727
                with:(Timestamp now printStringFormat:(self timestampFormat))
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1728
                with:originator
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1729
                with:message.
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1730
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1731
    "/ 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
  1732
    "/ we have to recode the message using locale-specific encoding
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1733
    Stderr isExternalStream ifTrue:[
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1734
        messageAsSent := messageAsSent string.  "take care of Texts"
25239
b1563bf0a20f #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 25212
diff changeset
  1735
        messageAsSent := OperatingSystem encodeTerminalOutput:messageAsSent.
25135
98f799af1e48 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 24830
diff changeset
  1736
        messageAsSent _errorPrintCR.
25308
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
  1737
    ] ifFalse:[
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
  1738
        Stderr nextPutLine: messageAsSent
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1739
    ].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1740
25308
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
  1741
    (DebugIfLogGenerated ? false) ifTrue:[
25309
3880cfe5fb36 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 25308
diff changeset
  1742
        "/ DebugIfLogGenerated := false
3880cfe5fb36 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 25308
diff changeset
  1743
        self halt:'Log message generated'
25308
7dba8ded6732 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 25239
diff changeset
  1744
    ].
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1745
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1746
    "Created: / 28-06-2018 / 11:05:17 / Stefan Vogel"
23572
75f7f0f297a2 #BUGFIX by sr
sr
parents: 23200
diff changeset
  1747
    "Modified: / 20-12-2018 / 12:33:00 / sr"
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1748
!
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1749
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1750
expand:message
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1751
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1752
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1753
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1754
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1755
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1756
    "Created: / 13-03-2017 / 15:34:47 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1757
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1758
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1759
expand:message addingInfoFrom:aContext to:aDictionary
21682
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1760
    |messageString mthd rcvr methodWho|
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1761
    
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1762
    (messageString := message) isString ifFalse:[
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1763
        messageString := message value asString.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1764
        messageString isString ifFalse:[ ^ messageString asString].
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1765
    ].
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1766
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1767
    mthd := aContext method.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1768
    rcvr := aContext receiver.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1769
    methodWho := mthd whoString.
21681
08cdd57378f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 21644
diff changeset
  1770
    
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1771
    aDictionary at:'LINE' put:(aContext lineNumber).
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1772
    aDictionary at:'RECEIVER' put:[rcvr displayString].
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1773
    aDictionary at:'CLASS' put:(rcvr class name).
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1774
    aDictionary at:'MCLASS' put:(mthd mclass displayString).
24133
e53dd957676b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24132
diff changeset
  1775
    aDictionary at:'SELECTOR' put:(mthd selector ? 'doIt').
21682
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1776
    aDictionary at:'WHO' put:methodWho.
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1777
    aDictionary at:'WHERE' put:(methodWho,'@',aContext lineNumber printString).
7d63019a886c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 21681
diff changeset
  1778
    ^ messageString expandPlaceholdersWith:aDictionary
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1779
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1780
    "
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1781
     Logger warning:'some problem with %(RECEIVER)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1782
     Logger warning:'some problem with %(RECEIVER) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1783
     Logger warning:'some problem with %(CLASS) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1784
     Logger warning:'some problem with %(MCLASS) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1785
     Logger warning:'some problem with %(SELECTOR) in %(LINE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1786
     Logger warning:'some problem with %(WHERE)'
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1787
    "
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1788
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1789
    "Created: / 13-03-2017 / 15:46:52 / cg"
21741
02a8a0495313 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 21682
diff changeset
  1790
    "Modified: / 03-05-2017 / 15:38:35 / cg"
24260
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1791
    "Modified: / 05-06-2019 / 21:06:40 / Claus Gittinger"
39bb70df6450 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 24209
diff changeset
  1792
    "Modified (comment): / 06-06-2019 / 09:05:07 / Claus Gittinger"
21640
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1793
!
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
expand:message with:arg1
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1796
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1797
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1798
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1799
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1800
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1801
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1802
    "Created: / 13-03-2017 / 15:37:25 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1803
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1804
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1805
expand:message with:arg1 with:arg2
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1806
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1807
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1808
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1809
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1810
    d at:2 put:arg2.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1811
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1812
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1813
    "Created: / 13-03-2017 / 15:38:50 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1814
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1815
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1816
expand:message with:arg1 with:arg2 with:arg3
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1817
    |d|
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1818
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1819
    d := Dictionary new.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1820
    d at:1 put:arg1.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1821
    d at:2 put:arg2.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1822
    d at:3 put:arg3.
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1823
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1824
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1825
    "Created: / 13-03-2017 / 15:41:05 / cg"
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1826
!
721cffbe9b6f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21626
diff changeset
  1827
24020
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1828
expand:message with:arg1 with:arg2 with:arg3 with:arg4
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1829
    |d|
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1830
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1831
    d := Dictionary new.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1832
    d at:1 put:arg1.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1833
    d at:2 put:arg2.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1834
    d at:3 put:arg3.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1835
    d at:4 put:arg4.
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1836
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1837
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1838
    "Created: / 13-03-2017 / 15:41:05 / cg"
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1839
!
97395eb5a394 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 23671
diff changeset
  1840
24508
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1841
expand:message withArguments:args
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1842
    |d|
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1843
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1844
    d := Dictionary new.
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1845
    args keysAndValuesDo:[:eachIdx :eachArg|
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1846
        d at:eachIdx put:eachArg.
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1847
    ].
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1848
    ^ self expand:message addingInfoFrom:(thisContext sender sender) to:d
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1849
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1850
    "Created: / 05-08-2019 / 21:02:55 / Stefan Vogel"
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1851
!
0b2cc77b316f #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 24260
diff changeset
  1852
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1853
facilityOf:originator 
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1854
    originator isProtoObject ifTrue:[
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1855
        ^ originator class logFacility.
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1856
    ].
24141
e3c4af5e8b20 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 24139
diff changeset
  1857
    ^ originator logFacility
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1858
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1859
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1860
"/    ^ originator class
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1861
"/        perform:#logFacility
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1862
"/        ifNotUnderstood:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1863
"/            |pkg|
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1864
"/
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1865
"/            pkg := originator class package.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1866
"/            (pkg startsWith:'stx') ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1867
"/                'STX'
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1868
"/            ] ifFalse:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1869
"/                pkg copyFrom:((pkg lastIndexOf:$:) + 1)
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1870
"/            ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1871
"/        ]
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1872
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1873
    "
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1874
     Logger facilityOf: Object
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  1875
     Logger facilityOf: Expecco::Browser
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1876
    "
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1877
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1878
    "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
  1879
    "Modified: / 01-03-2017 / 10:43:23 / cg"
24141
e3c4af5e8b20 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 24139
diff changeset
  1880
    "Modified: / 24-05-2019 / 01:04:34 / Claus Gittinger"
24209
6c2adedc3eea #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 24141
diff changeset
  1881
    "Modified: / 28-05-2019 / 13:07:06 / Stefan Vogel"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1882
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1883
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1884
severityThresholdOf:originator
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1885
    "allow each class to define an individual threshold for Logging"
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1886
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1887
    |cls t|
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1888
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1889
    cls := originator class.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1890
    ThresholdPerClass notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1891
        t := ThresholdPerClass at:(cls theNonMetaclass name) ifAbsent:nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1892
        t notNil ifTrue:[^ t].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1893
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1894
    ThresholdPerPackage notNil ifTrue:[
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1895
        t := ThresholdPerPackage at:(cls package) ifAbsent:nil.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1896
        t notNil ifTrue:[^ t].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1897
    ].
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1898
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1899
    "/ disabled; the above scheme is better...
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1900
    "/ ^ cls 
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1901
    "/    perform:#logSeverityThreshold
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1902
    "/     ifNotUnderstood:[ ^ Threshold ]
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1903
    ^ Threshold
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1904
    
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1905
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1906
     Logger severityThresholdOf: Object
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1907
     Logger severityThresholdOf: Expecco::Browser
21608
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1908
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1909
     Logger loggingThreshold:(Logger severityDEBUG) forClass:(Expecco::Browser).
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1910
     Logger loggingThreshold:(Logger severityDEBUG) forPackage:'stx:libbasic'.
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1911
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1912
     Logger loggingThreshold:nil forClass:(Expecco::Browser).
492035ed86ab #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 21507
diff changeset
  1913
     Logger loggingThreshold:nil forPackage:'stx:libbasic'.
20951
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1914
    "
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
    "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
  1917
    "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
  1918
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1919
23148
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1920
!MiniLogger class methodsFor:'queries'!
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1921
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1922
canLog
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1923
    "answer true, if logging can be performed. Subclasse may redefine this."
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1924
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1925
    ^ (LogOnStderr and:[Stderr notNil])
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1926
       or:[LogOnTranscript and:[Transcript isView]].
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1927
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1928
    "Created: / 28-06-2018 / 10:47:29 / Stefan Vogel"
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1929
! !
0c8e169a2e11 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 23109
diff changeset
  1930
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1931
!MiniLogger::Severity methodsFor:'accessing'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1932
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1933
name
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1934
    ^ name
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1935
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1936
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1937
value
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1938
    ^ value
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1939
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1940
21796
25b71e5e33b6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 21741
diff changeset
  1941
!MiniLogger::Severity methodsFor:'arithmetic'!
20951
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
+ aNumber
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1944
    |next|
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1945
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1946
    next := value + aNumber.
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1947
    aNumber negative ifTrue:[
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1948
        ^ 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
  1949
    ].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1950
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1951
    ^ 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
  1952
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1953
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1954
        MiniLogger severityINFO + 1
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1955
        MiniLogger severityTRACE to:MiniLogger severityFATAL do:[:each| Transcript showCR:each].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1956
        MiniLogger severityFATAL downTo:MiniLogger severityTRACE do:[:each| Transcript showCR:each].
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1957
    "
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1958
! !
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1959
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1960
!MiniLogger::Severity methodsFor:'comparing'!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1961
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1962
< aSeverity
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1963
    ^ value < aSeverity value
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1964
!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1965
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1966
= aSeverity
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1967
    ^ self == aSeverity or:[value = aSeverity value]
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1968
!
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1969
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1970
hash
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1971
    "instances, for which #= answers true must answer the same hash"
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1972
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1973
    ^ value hash
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1974
! !
c6026bc64d24 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 20848
diff changeset
  1975
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1976
!MiniLogger::Severity methodsFor:'initialization'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1977
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1978
initializeWithName: aString value: anInteger
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1979
    name := aString.
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1980
    value := anInteger
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  1981
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1982
    "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
  1983
! !
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1984
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1985
!MiniLogger::Severity methodsFor:'printing & storing'!
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1986
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1987
displayOn:aStream
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1988
    "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
  1989
     for developers "
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1990
24129
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1991
    name printOn:aStream.
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1992
    aStream nextPutAll:':'.
ca2d5b78d628 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24103
diff changeset
  1993
    value printOn:aStream.
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  1994
24132
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1995
    "Created: / 22-05-2019 / 19:24:12 / Claus Gittinger"
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1996
!
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1997
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1998
printOn:aStream
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  1999
    "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
  2000
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  2001
    name printOn:aStream.
2cd596116c20 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 24129
diff changeset
  2002
16826
a7fd70258cef Major refactoring of MiniLogger (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16784
diff changeset
  2003
    "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
  2004
    "Modified: / 22-05-2019 / 19:24:16 / Claus Gittinger"
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2005
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2006
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2007
!MiniLogger class methodsFor:'documentation'!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2008
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2009
version
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  2010
    ^ '$Header$'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2011
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2012
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2013
version_CVS
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  2014
    ^ '$Header$'
14881
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  2015
!
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  2016
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  2017
version_HG
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  2018
16782
ee6003ea5c4e class: MiniLogger
Claus Gittinger <cg@exept.de>
parents: 14881
diff changeset
  2019
    ^ '$Changeset: <not expanded> $'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2020
!
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2021
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2022
version_SVN
20218
415a8f568e3f #OTHER by mawalch
mawalch
parents: 17308
diff changeset
  2023
    ^ '$Id$'
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2024
! !
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2025
14881
28ba52b80aa7 Bugfixes: log using specified severity.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13810
diff changeset
  2026
13810
ce0b6a1fc5cb initial checkin
vrany
parents:
diff changeset
  2027
MiniLogger initialize!