summaryrefslogtreecommitdiffstats
path: root/services/logging_service.py
blob: 3ae7b75913dcc62f2419ad0a0dd6568d74e7a3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import logging


class LoggingServiceFactory(object):
    __logger = None

    def __init__(self):
        if self.__logger is None:
            self.__set_logger()

    @classmethod
    def __set_logger(cls):
        if cls.__logger is None:
            cls.__logger = logging.getLogger('vvp-ci.logger')

    @classmethod
    def get_logger(cls):
        if cls.__logger is None:
            cls.__set_logger()
        return cls.__logger