Revision 9986e569 kamaki/cli/commands/__init__.py

b/kamaki/cli/commands/__init__.py
31 31
# interpreted as representing official policies, either expressed
32 32
# or implied, of GRNET S.A.command
33 33

  
34
from kamaki import logger
34
from kamaki.logger import get_logger
35 35

  
36
logger.add_file_logger('cli', __name__, filename=logger.get_log_filename())
37
sendlog = logger.get_logger('cli')
36
log = get_logger('kamaki.cli')
38 37

  
39 38

  
40 39
class _command_init(object):
......
55 54
                self['config'].get('global', 'log_token') == 'on',
56 55
                self['config'].get('global', 'log_data') == 'on')
57 56
        except Exception as e:
58
            sendlog.warning('Failed to read custom log settings: %s' % e)
59
            sendlog.warning('\tdefaults for token and data logging are off')
57
            log.warning('Failed to read custom log settings: %s' % e)
58
            log.warning('\tdefaults for token and data logging are off')
60 59
            pass
61 60

  
62 61
    def _update_max_threads(self):
......
65 64
            assert max_threads > 0
66 65
            self.client.MAX_THREADS = max_threads
67 66
        except Exception as e:
68
            sendlog.warning('Failed to read custom thread settings: %s' % e)
69
            sendlog.warning(
67
            log.warning('Failed to read custom thread settings: %s' % e)
68
            log.warning(
70 69
                '\tdefault for max threads is %s' % self.client.MAX_THREADS)
71 70
            pass
72 71

  

Also available in: Unified diff