MCPcopy Create free account
hub / github.com/EasyIME/PIME / define_logging_options

Function define_logging_options

python/python3/tornado/log.py:265–343  ·  view source on GitHub ↗

Add logging-related flags to ``options``. These options are present automatically on the default options instance; this method is only necessary if you have created your own `.OptionParser`. .. versionadded:: 4.2 This function existed in prior versions but was broken and undocu

(options: Any = None)

Source from the content-addressed store, hash-verified

263
264
265def define_logging_options(options: Any = None) -> None:
266 """Add logging-related flags to ``options``.
267
268 These options are present automatically on the default options instance;
269 this method is only necessary if you have created your own `.OptionParser`.
270
271 .. versionadded:: 4.2
272 This function existed in prior versions but was broken and undocumented until 4.2.
273 """
274 if options is None:
275 # late import to prevent cycle
276 import tornado.options
277
278 options = tornado.options.options
279 options.define(
280 "logging",
281 default="info",
282 help=(
283 "Set the Python log level. If 'none', tornado won't touch the "
284 "logging configuration."
285 ),
286 metavar="debug|info|warning|error|none",
287 )
288 options.define(
289 "log_to_stderr",
290 type=bool,
291 default=None,
292 help=(
293 "Send log output to stderr (colorized if possible). "
294 "By default use stderr if --log_file_prefix is not set and "
295 "no other logging is configured."
296 ),
297 )
298 options.define(
299 "log_file_prefix",
300 type=str,
301 default=None,
302 metavar="PATH",
303 help=(
304 "Path prefix for log files. "
305 "Note that if you are running multiple tornado processes, "
306 "log_file_prefix must be different for each of them (e.g. "
307 "include the port number)"
308 ),
309 )
310 options.define(
311 "log_file_max_size",
312 type=int,
313 default=100 * 1000 * 1000,
314 help="max size of log files before rollover",
315 )
316 options.define(
317 "log_file_num_backups", type=int, default=10, help="number of log files to keep"
318 )
319
320 options.define(
321 "log_rotate_when",
322 type=str,

Callers 2

options.pyFile · 0.90
setUpMethod · 0.90

Calls 3

enable_pretty_loggingFunction · 0.85
defineMethod · 0.80
add_parse_callbackMethod · 0.80

Tested by 1

setUpMethod · 0.72