File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,15 @@ options: context [ ; Options supplied to REBOL during startup
145
145
default-suffix: %.reb ; Used by IMPORT if no suffix is provided
146
146
file-types: []
147
147
result-types: none
148
+
149
+ ; verbosity of logs per service (codecs, schemes)
150
+ ; 0 = nothing; 1 = info; 2 = more; 3 = debug
151
+ log: make object! [
152
+ http:
153
+ tls:
154
+ zip:
155
+ tar: 1
156
+ ]
148
157
]
149
158
150
159
script : context [
Original file line number Diff line number Diff line change @@ -113,13 +113,16 @@ log: func [
113
113
/info
114
114
/more
115
115
/debug
116
+ /local level
116
117
] [
118
+ level: select system/options/log id
119
+ if any [none? level level <= 0 ] [exit]
117
120
if block? msg [msg: form reduce :msg ]
118
121
case [
119
- info [ print ajoin [" ^[ [1;33m[" id "] ^[ [36m" msg "^[ [0m" ]]
120
- more [ print ajoin [" ^[ [33m[" id "] ^[ [0;36m" msg "^[ [0m" ]]
121
- debug [ print ajoin [" ^[ [33m[" id "] ^[ [0;32m" msg "^[ [0m" ]]
122
- true [ print ajoin [" ^[ [33m[" id "] " msg "^[ [0m" ]]
122
+ info [ if level > 0 [ print ajoin [" ^[ [1;33m[" id "] ^[ [36m" msg "^[ [0m" ] ]]
123
+ more [ if level > 1 [ print ajoin [" ^[ [33m[" id "] ^[ [0;36m" msg "^[ [0m" ] ]]
124
+ debug [ if level > 2 [ print ajoin [" ^[ [33m[" id "] ^[ [0;32m" msg "^[ [0m" ] ]]
125
+ true [ if level > 0 [ print ajoin [" ^[ [33m[" id "] " msg "^[ [0m" ] ]]
123
126
]
124
127
]
125
128
You can’t perform that action at this time.
0 commit comments