-
Notifications
You must be signed in to change notification settings - Fork 43
Clean-up main model: Add logger interface #1093
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
Open
mgovers
wants to merge
33
commits into
main
Choose a base branch
from
feature/logger-interface
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
e0b3f57
logging calculation info
mgovers 57088c8
Merge branch 'feature/timer-using-codes' into feature/logger-interface
mgovers adc6651
Merge remote-tracking branch 'origin/main' into feature/logger-interface
mgovers 70cf27c
Merge remote-tracking branch 'origin/feature/timer-using-codes' into …
mgovers 5f4ec7c
cleanup
mgovers 83a4459
replace calculation info with generic logger
mgovers 3f8c22e
Merge remote-tracking branch 'origin/feature/timer-using-codes' into …
mgovers 72ec561
Merge branch 'main' into feature/logger-interface
mgovers c1d6b99
improve header include order
mgovers cf7534e
extend process
mgovers d3d1ae0
fix tests
mgovers 30057cb
use report when reporting
mgovers 644d8d9
improve type exposure
mgovers 4432cfc
fix
mgovers 9fc3c39
remove remaining headers from calculation info
mgovers 008e980
fix benchmark compilation
mgovers 485bad7
Merge remote-tracking branch 'origin/main' into feature/logger-interface
mgovers 3cc60aa
apply suggestion
mgovers 126b1c4
clang-tidy
mgovers 69b737a
return void
mgovers 97cf176
fix compilation
mgovers babf8b1
remove log dispatcher cfr. offline discussion
mgovers aac61a1
resolve sonar cloud
mgovers 6bdea5f
resolve sonar cloud
mgovers e6faf8a
sonar cloud
mgovers f4ba5a7
fix
mgovers b700a08
noexcept
mgovers bbc901e
noexcept
mgovers ff561f1
fix compilation
mgovers 474a313
unused variable
mgovers 720984d
sonar cloud
mgovers ddb62cc
public virtual destructor
mgovers abe24bf
Merge branch 'main' into feature/logger-interface
mgovers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
power_grid_model_c/power_grid_model/include/power_grid_model/common/logging_impl.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
// | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
#pragma once | ||
|
||
#include "logging.hpp" | ||
|
||
#include <string_view> | ||
#include <vector> | ||
|
||
namespace power_grid_model::common::logging { | ||
class NoLogger : public Logger { | ||
public: | ||
void log(LogEvent /*tag*/) override { | ||
// no logging | ||
} | ||
void log(LogEvent /*tag*/, std::string_view /*message*/) override { | ||
// no logging | ||
} | ||
void log(LogEvent /*tag*/, double /*value*/) override { | ||
// no logging | ||
} | ||
void log(LogEvent /*tag*/, Idx /*value*/) override { | ||
// no logging | ||
} | ||
}; | ||
|
||
} // namespace power_grid_model::common::logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.