Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] Assess the Logger situation and eliminate inefficiency #5038

Open
jmarrec opened this issue Nov 14, 2023 · 1 comment
Open

[refactor] Assess the Logger situation and eliminate inefficiency #5038

jmarrec opened this issue Nov 14, 2023 · 1 comment
Labels
component - logs and warnings Enhancement Request Triage Issue needs to be assessed and labeled, further information on reported might be needed

Comments

@jmarrec
Copy link
Collaborator

jmarrec commented Nov 14, 2023

Enhancement Request

Eliminate the use of StringStreamLogSink

 * The use of a `StringStreamSinkLogSink`, for eg for EnergyPlus ForwardTranslator and then **regex parsing** that to derive logMessages is an abomination that should be eliminated.

Detailed Description

Regex parsing is slow, and expensive.

It also poses an extensibility/customization issue: If changing the formatter (the format of the log messages), the parseLogText gets thrown out the window.

Possible Implementation

  1. The use of a pattern similar to the one I used in XMLValidator is a possibility
  2. Write our end backend sink and override consume to emplace LogMessages is probably the sanest option

Other issues

  • We use a synchronized_feeding backend sink, I think we may need a concurrent_feeding one
  • It seems like we may be misusing mutexes.
  • This is confusing naming:
    using LogSinkBackend = boost::log::sinks::synchronous_sink<boost::log::sinks::text_ostream_backend>;
    • boost::log::sinks::synchronous_sink is a frontend sink
    • boost::log::sinks::text_ostream_backend is the backend

Context

List of references:

@jmarrec jmarrec added Enhancement Request Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Nov 14, 2023
@jmarrec jmarrec changed the title Eliminate the use of StringStreamLogSink [refactor] Assess the Logger situation and eliminate inefficiency Nov 15, 2023
@shorowit
Copy link
Contributor

Related issue? #4821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - logs and warnings Enhancement Request Triage Issue needs to be assessed and labeled, further information on reported might be needed
Projects
None yet
Development

No branches or pull requests

3 participants