Conditions | 3 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python3 |
||
23 | def init_logger(): |
||
24 | """ |
||
25 | Initialize the logger instance |
||
26 | :return: |
||
27 | """ |
||
28 | global logger |
||
29 | logger = logging.getLogger('db_sync_tool') |
||
30 | logger.setLevel(logging.DEBUG) |
||
31 | |||
32 | if system.config: |
||
33 | if 'log_file' in system.config: |
||
34 | fh = logging.FileHandler(system.config['log_file']) |
||
35 | fh.setLevel(logging.DEBUG) |
||
36 | logger.addHandler(fh) |
||
37 | formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') |
||
38 | fh.setFormatter(formatter) |
||
39 | logger.addHandler(fh) |
||
40 | |||
50 |
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.