Projekt

Obecné

Profil

Stáhnout (1.72 KB) Statistiky
| Větev: | Tag: | Revize:
1
# This file is the logger configuration file.
2
# ==========================================
3

    
4
[loggers]
5
# Name of the logger.
6
keys=root
7

    
8
# ==========================================
9

    
10
[handlers]
11
# List of different types of handlers defined within the application.
12
keys=consoleHandler, logFileHandler
13

    
14
# ==========================================
15

    
16
[formatters]
17
# Name of the formatter used for the log messages.
18
keys=simpleFormatter
19

    
20
# ==========================================
21

    
22
[logger_root]
23
# Level of debugging set for the root logger.
24
level=DEBUG
25

    
26
# Handler set for the root logger.
27
handlers=consoleHandler
28

    
29
# ==========================================
30

    
31
[handler_consoleHandler]
32
# Class used for the console logger.
33
class=StreamHandler
34

    
35
# Level of debugging set for the console logger.
36
level=DEBUG
37

    
38
# Formatter used for the console logger.
39
formatter=simpleFormatter
40

    
41
# Arguments passed in when instantiating the logger.
42
args=(sys.stdout,)
43

    
44
# ==========================================
45

    
46
[handler_logFileHandler]
47
# Class used for the file logger - rotating file.
48
class=handlers.RotatingFileHandler
49

    
50
# Level of debugging set for the file logger.
51
level=NOTSET
52

    
53
# Arguments passed in when instantiating the logger.
54
# log_file.log - name of the rotating log file
55
# a            - append to the file - do not overwrite it
56
# 10485760     - maximum size of the file - 10 MB
57
# 1            - number of backups kept on the disk
58
args=('log_file.log', 'a', 10485760, 1)
59

    
60
# Formatter used for the file logger.
61
formatter=simpleFormatter
62

    
63
# ==========================================
64

    
65
[formatter_simpleFormatter]
66
# Definition of a custom log formatter. All log
67
# messages have the following format: [datetime] - [level] - [message]
68
format=%(asctime)s - %(levelname)s - %(message)s
(2-2/2)