-
Notifications
You must be signed in to change notification settings - Fork 72
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
New logging API #2194
Open
snej
wants to merge
12
commits into
master
Choose a base branch
from
feature/log-observer
base: master
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
New logging API #2194
+1,839
−1,123
Conversation
This file contains 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
snej
force-pushed
the
feature/log-observer
branch
3 times, most recently
from
December 16, 2024 23:03
7708a61
to
cf107a9
Compare
- c4Log.h now includes c4Base.h, not the other way around (this is because the new log API requires C4Timestamp) - Added includes to sources files that now need it - Moved c4Log implementation out of c4Base.cc to new c4Log.cc
Old API is still present but "semi-deprecated".
snej
force-pushed
the
feature/log-observer
branch
2 times, most recently
from
December 17, 2024 23:06
5be1ef6
to
aaff463
Compare
The code got a lot cleaner when I replaced the three parallel arrays with a class `LogFile`.
snej
force-pushed
the
feature/log-observer
branch
from
December 18, 2024 20:24
1785311
to
5d98e1e
Compare
snej
force-pushed
the
feature/log-observer
branch
from
December 18, 2024 20:33
5d98e1e
to
b081c30
Compare
Code Coverage Results:
|
The logging code no longer has to create and tear down a stringstream every time.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
API:
#include c4log.h
statements.c4log_initConsole()
adds an observer that logs to the console. CppTests and C4Tests call it at startup.Implementation:
LogObserver
is used to receive log messages.LogFiles
andLogCallback
.Review notes: