Skip to content

Commit

Permalink
ci: Lint fixes
Browse files Browse the repository at this point in the history
Removed old stuff, and pulled out MutatorType to make the
RallyEcsFormatter definition shorter
  • Loading branch information
favilo committed Dec 10, 2024
1 parent 14abad5 commit e6c000a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions esrally/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ def configure_utc_formatter(*args: typing.Any, **kwargs: typing.Any) -> logging.
return formatter


MutatorType = typing.Callable[[logging.LogRecord, typing.Dict[str, typing.Any]], None]


class RallyEcsFormatter(ecs_logging.StdlibFormatter):
def __init__(
self,
mutators: typing.Optional[typing.List[typing.Callable[[typing.Dict[str, typing.Any]], None]]] = None,
*args: typing.Any,
mutators: typing.Optional[typing.List[MutatorType]] = None,
**kwargs: typing.Any,
):
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -95,15 +98,6 @@ def configure_ecs_formatter(*args: typing.Any, **kwargs: typing.Any) -> ecs_logg
return formatter


def configure_json_formatter(*args: typing.Any, **kwargs: typing.Any) -> RallyJsonFormatter:
"""
JSON Logging formatter
"""
formatter = jsonlogger.JsonFormatter(*args, **kwargs)

return formatter


def log_config_path():
"""
:return: The absolute path to Rally's log configuration file.
Expand Down

0 comments on commit e6c000a

Please sign in to comment.