Exemplo n.º 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')
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)