Blame view

logs/Readme.md 697 Bytes
f30ac7a5   Etienne Pallier   fichier logs/Read...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
File Logs are organized by module

every file is reseted at pyros launch except pyros.log
You must clean this directory before pushing.
You can use the pyrosrun.sh clear_logs command.

For example, logs for the module MONITORING must be in the file :

>     monitoring.logs

The logs are formated like this :

>     '%(filename)s : %(lineno)s -> %(message)s'
>     "filename : line -> message".

To use the logger you must import logger.config

>    import logger.config as l
>    log = l.setupLogger("name", "file_name")

Basic log :

>    log.info('Your message')

if you want to log in the file pyros.log you must use logging

>    import logger.config as l
>    l.logging.info('Your message')