Commit f30ac7a55c5fcfc7db3062b23eb5d8057cea4ec0
1 parent
693b8c91
Exists in
dev
fichier logs/Readme remis pour les tests unit...
Showing
1 changed file
with
28 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,28 @@ |
1 | +File Logs are organized by module | |
2 | + | |
3 | +every file is reseted at pyros launch except pyros.log | |
4 | +You must clean this directory before pushing. | |
5 | +You can use the pyrosrun.sh clear_logs command. | |
6 | + | |
7 | +For example, logs for the module MONITORING must be in the file : | |
8 | + | |
9 | +> monitoring.logs | |
10 | + | |
11 | +The logs are formated like this : | |
12 | + | |
13 | +> '%(filename)s : %(lineno)s -> %(message)s' | |
14 | +> "filename : line -> message". | |
15 | + | |
16 | +To use the logger you must import logger.config | |
17 | + | |
18 | +> import logger.config as l | |
19 | +> log = l.setupLogger("name", "file_name") | |
20 | + | |
21 | +Basic log : | |
22 | + | |
23 | +> log.info('Your message') | |
24 | + | |
25 | +if you want to log in the file pyros.log you must use logging | |
26 | + | |
27 | +> import logger.config as l | |
28 | +> l.logging.info('Your message') | ... | ... |