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