Skip to content

Automatically add line break at the end of log messages

Pavel Kisliak requested to merge epam/uniform_logging_style4 into main

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [Yes]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description?

Third part of work on uniform logging style (issue: #53 (closed)), removing requirement about add line break at the end of log message.
This will be responsibility of exact message handler, for example console output requires line break, but this is redundant for XML.

For example, below log messages:

OES_ERROR("ETP Dataspace not found: {}\n", space_path);
OES_INFO("{}\n", errorStr);

Can be just:

OES_ERROR("ETP Dataspace not found: {}", space_path);
OES_INFO(errorStr);

List of changes:

  • Automatically add line break at the end of log messages (in the ConsoleMessageHandler)
  • Remove line breaks ('\n') from existing log messages (preserved one line break when there was double "\n\n")

After merging this MR, adding '\n' at the end of log message, will lead to print an extra empty line.
Unfortunately, compatibility mode isn't implemented due to previously existed double line breaks.

Edited by Pavel Kisliak

Merge request reports

Loading