Пример #1
0
    def test_should_create_console_logger_using_the_given_log_level(self, mock_create_console_handler):

        mock_logger = Mock()

        append_console_logger(mock_logger, "log level")

        mock_create_console_handler.assert_called_with("log level")
    def test_should_create_console_logger_using_the_given_log_level(
            self, mock_create_console_handler):

        mock_logger = Mock()

        append_console_logger(mock_logger, 'log level')

        mock_create_console_handler.assert_called_with('log level')
Пример #3
0
    def test_should_append_created_log_handler_to_given_logger(self, mock_create_console_handler):

        mock_handler = Mock()
        mock_create_console_handler.return_value = mock_handler
        mock_logger = Mock()

        append_console_logger(mock_logger, "log level")

        mock_logger.addHandler(mock_handler)
    def test_should_append_created_log_handler_to_given_logger(
            self, mock_create_console_handler):

        mock_handler = Mock()
        mock_create_console_handler.return_value = mock_handler
        mock_logger = Mock()

        append_console_logger(mock_logger, 'log level')

        mock_logger.addHandler(mock_handler)
Пример #5
0
def initialize_logging_to_console(arguments):
    """ Initializes the logging to console and
        appends the console handler to the root logger """

    console_log_level = determine_console_log_level(arguments)
    append_console_logger(LOGGER, console_log_level)
Пример #6
0
def initialize_logging_to_console(arguments):
    """ Initializes the logging to console and
        appends the console handler to the root logger """

    console_log_level = determine_console_log_level(arguments)
    append_console_logger(LOGGER, console_log_level)