All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
messages_icarus.fcl
Go to the documentation of this file.
1 #
2 # File: messages_icarus.fcl
3 # Purpose: presets for art message logging
4 # Author: Gianluca Petrillo
5 # Date: October 13, 2020
6 # Version: 1.1
7 #
8 # Provided presets:
9 # - icarus_message_services: kind of "standard"
10 # - icarus_message_services_prod: non-interactive jobs (like in production)
11 # - icarus_message_services_prod_debug: non-interactive jobs with debugging
12 # - icarus_message_services_interactive: interactive jobs
13 # - icarus_message_services_interactive_debug: interactive jobs with debugging
14 #
15 # Reminder: to limit a number of messages in a specific category,
16 # add in a destination a configuration for that category:
17 #
18 # categories: {
19 #
20 # # suppress all the messages in "UselessMessage" category
21 # UselessMessage: { limit: 0 }
22 #
23 # # reduce the messages from "AnnoyingMessage" category;
24 # # they will still appear now and then
25 # AnnoyingMessage: { limit: 5 timespan: 10 }
26 #
27 # # this means no limit
28 # default: {}
29 #
30 # }
31 #
32 #
33 # Usage:
34 #
35 # services.message: @local::icarus_message_services
36 #
37 #
38 # Changes:
39 # 20180521 (petrillo@slac.stanford.edu) [v1.0]
40 # adapted from messages_sbnd.fcl (sbndcode v06_76_00)
41 # 20201013 (petrillo@slac.stanford.edu) [v1.1]
42 #
43 
44 
45 BEGIN_PROLOG
46 
47 #
48 # standard ICARUS message destinations
49 #
50 message_debugfile_icarus: {
51  #
52  # message destination: all debug messages to a file
53  #
54  type: "file"
55  filename: "debug.log"
56  append: false
57  threshold: "DEBUG"
58  categories: {
59  default: {}
60  }
61 } # message_debugfile_icarus
62 
63 
64 message_infofile_icarus: {
65  #
66  # message destination: all debug messages to a file
67  #
68  type: "file"
69  filename: "messages.log"
70  append: false
71  threshold: "INFO"
72  categories: {
73  default: {}
74  }
75 } # message_infofile_icarus
76 
77 
78 message_errorfile_icarus: {
79  #
80  # message destination: all error messages to "errors.log" file
81  #
82  type: "file"
83  filename: "errors.log"
84  append: false
85  threshold: "ERROR"
86  categories: {
87  default: {}
88  }
89 } # message_errorfile_icarus
90 
91 
92 message_stdout_warning_icarus: {
93  #
94  # message destination: all warning messages to standard output
95  #
96  type: "cout"
97  threshold: "WARNING"
98  categories:{
99  default: {}
100  }
101 } # message_stdout_warning_icarus
102 
103 
104 message_stdout_icarus: {
105  #
106  # message destination: all messages to standard output;
107  # special suppression for NuRandomService messages
108  # (recover them with `message_randomseeds_file_icarus`)
109  #
110  type: "cout"
111  threshold: "INFO"
112  categories:{
113  default: {}
114  NuRandomService: { limit: 0 }
115  }
116 } # message_stdout_icarus
117 
118 
119 message_stderr_icarus: {
120  #
121  # message destination: all error messages to standard error
122  #
123  type: "cerr"
124  threshold: "ERROR"
125  categories:{
126  default: {}
127  }
128 } # message_stderr_icarus
129 
130 
131 message_randomseeds_file_icarus: {
132  #
133  # message destination: all NuRandomService messages to "randomseeds.log" file
134  #
135  type: "file"
136  filename: "randomseeds.log"
137  append: false
138  threshold: "INFO"
139  categories: {
140  NuRandomService: { limit: -1 }
141  default: { limit: 0 }
142  }
143 } # message_randomseeds_file_icarus
144 
145 #
146 # icarus_message_services
147 # ------------------------
148 #
149 # Enables debug messages. Errors saved in a file.
150 #
151 # - standard output with only WARNING and worse
152 # - "errors.log" collecting error messages (also included in standard output)
153 # - "debug.log" with DEBUG (that is, every message) for all modules;
154 # in non-debug qualifier builds, LOG_DEBUG and LOG_TRACE are disabled and
155 # their messages are never produced (that is, won't be in "debug.log" either).
156 #
157 # No special stream for errors.
158 #
159 icarus_message_services:
160 {
161  destinations: {
162  LogStandardOut: @local::message_stdout_warning_icarus
163  LogInfoFile: @local::message_infofile_icarus
164  LogErrorFile: @local::message_errorfile_icarus
165  }
166 
167 } # icarus_message_services
168 
169 
170 #
171 # icarus_message_services_prod_debug
172 # -----------------------------------
173 #
174 # Enables debug messages.
175 #
176 # - standard error with only ERROR and worse
177 # - standard output with only WARNING and worse (will also repeat the error
178 # messages, that will appear in error messages being printed twice if the
179 # standard output and error are directed to the same file or to the console)
180 # - "debug.log" with DEBUG (that is, every message) for all modules;
181 # in non-debug qualifier builds, LOG_DEBUG and LOG_TRACE are disabled and
182 # their messages are never produced (that is, won't be in "debug.log" either).
183 #
184 icarus_message_services_prod_debug:
185 {
186  destinations: {
187  LogDebugFile: @local::message_debugfile_icarus
188  LogStandardOut: @local::message_stdout_warning_icarus
189  LogStandardError: @local::message_stderr_icarus
190  }
191 } # icarus_message_services_prod_debug
192 
193 
194 icarus_message_services_prod_debug.destinations.LogDebugFile.categories:{
195  default: { }
196 }
197 
198 
199 #
200 # icarus_message_services_prod
201 # -----------------------------
202 #
203 # - standard error with only ERROR and worse
204 # - standard output with only WARNING and worse (will also repeat the error
205 # messages, that will appear in error messages being printed twice if the
206 # standard output and error are directed to the same file or to the console)
207 #
208 #
209 icarus_message_services_prod:
210 {
211  destinations: {
212  LogStandardOut: @local::message_stdout_warning_icarus
213  LogStandardError: @local::message_stderr_icarus
214  }
215 }
216 
217 
218 #
219 # icarus_message_services_interactive
220 # ------------------------------------
221 #
222 # - standard output with only INFO and worse
223 # - "errors.log" collecting warning and error messages (also included in
224 # standard output)
225 #
226 # No special stream for errors.
227 #
228 #
229 icarus_message_services_interactive:
230 {
231  destinations: {
232  LogStandardOut: @local::message_stdout_icarus
233  LogSeeds: @local::message_randomseeds_file_icarus
234  LogErrorFile: @local::message_errorfile_icarus
235  }
236 }
237 icarus_message_services_interactive.destinations.LogErrorFile.threshold: "WARNING"
238 
239 
240 #
241 # icarus_message_services_interactive_debug
242 # ------------------------------------------
243 #
244 # Enables debug messages.
245 #
246 # - standard output with only INFO and worse
247 # - "errors.log" collecting warning and error messages (also included in
248 # standard output)
249 # - "debug.log" with DEBUG (that is, every message) for all modules;
250 # in non-debug qualifier builds, LOG_DEBUG and LOG_TRACE are disabled and
251 # their messages are never produced (that is, won't be in "debug.log" either).
252 #
253 # No special stream for errors.
254 #
255 #
256 icarus_message_services_interactive_debug: {
257  @table::icarus_message_services_interactive
258 }
259 icarus_message_services_interactive_debug.destinations.LogDebugFile: @local::message_debugfile_icarus
260 
261 
262 END_PROLOG
BEGIN_PROLOG could also be dds filename