def start_with_log_level(self, level: LogLevel): """Sets a custom log level and starts emerge. Args: level (LogLevel): A given log level. """ Logger.set_log_level(level) self.start()
# Authors: Grzegorz Lato <*****@*****.**> # License: MIT import pyparsing as pp from typing import Dict, List from enum import Enum, unique import coloredlogs import logging from emerge.languages.abstractparser import AbstractParser, AbstractParsingCore, Parser, CoreParsingKeyword, LanguageType from emerge.results import EntityResult, FileResult from emerge.abstractresult import AbstractResult, AbstractFileResult, AbstractEntityResult from emerge.logging import Logger from emerge.statistics import Statistics LOGGER = Logger(logging.getLogger('parser')) coloredlogs.install(level='E', logger=LOGGER.logger(), fmt=Logger.log_format) @unique class GroovyParsingKeyword(Enum): CLASS = "class" OPEN_SCOPE = "{" CLOSE_SCOPE = "}" INLINE_COMMENT = "//" START_BLOCK_COMMENT = "/*" STOP_BLOCK_COMMENT = "*/" EXTENDS = "extends" IMPORT = "import" PACKAGE = "package" PACKAGE_NAME = "package_name"
def set_log_level(self, level: LogLevel): Logger.set_log_level(level)