def log(self, level, message):
        """Log given message.

        Parameters
        ==========
        level (string)
            indicates level of the message.
        message (string)
            text to be logged; can have multiple lines.
        """
        ### raise error if level isn't among allowed ones
        if level not in LOG_LEVELS:
            raise ValueError(LEVEL_ERROR_MESSAGE)

        ### create a header with a friendly representation
        ### of the current time

        header = HEADER_FORMATTER(level, get_friendly_time())

        ### choose a message formatter depending on whether
        ### or not the message has more than one line
        ### and create a full message by passing the
        ### header and message through it

        ## measure line count
        message_line_count = len(message.splitlines())

        ## choose formatter

        message_formatter = (
            MULTILINE_FORMATTER if message_line_count > 1 else SINGLE_LINE_FORMATTER
        )

        ## obtain full message by formatting
        ## header and message
        full_message = message_formatter(header, message)

        ### finally, extend the lines of the log with
        ### the ones we put together and limit the number
        ### of lines to the value in the 'max_lines'
        ### attribute

        self.contents += full_message + TWO_LINES

        self.contents = linesep.join(self.contents.splitlines()[-self.max_lines :])
Log given message.

        Parameters
        ==========
        level (string)
            indicates level of the message.
        message (string)
            text to be logged; can have multiple lines.
        
nodezator/our3rdlibs/userlogger.py