-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Improve logging and termination #1899
Open
Caellian
wants to merge
11
commits into
main
Choose a base branch
from
dev/improve-termination
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
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
Signed-off-by: Tin Švagelj <[email protected]>
github-actions
bot
added
sources
PR modifies project sources
dependencies
adds or removes dependencies, or suggests alternatives
build system
related to build system (CMake) and/or building process/assumptions
os: macos
related to MacOS
labels
May 4, 2024
✅ Deploy Preview for conkyweb canceled.
|
Caellian
force-pushed
the
dev/improve-termination
branch
6 times, most recently
from
May 4, 2024 01:26
b8e1a35
to
499d15f
Compare
Signed-off-by: Tin Švagelj <[email protected]>
Caellian
force-pushed
the
dev/improve-termination
branch
from
May 4, 2024 01:34
499d15f
to
ac0fd42
Compare
Caellian
added
the
feature
suggest addition of new functionality that isn't currently supported in any way
label
May 4, 2024
This removes some checks and formatting from log statements Signed-off-by: Tin Švagelj <[email protected]>
Not sure why it started with two nullptrs. Probably ancient code. Signed-off-by: Tin Švagelj <[email protected]>
Caellian
force-pushed
the
dev/improve-termination
branch
from
May 4, 2024 02:58
7d896cc
to
33716cb
Compare
This makes logging.h/cc not have to know about `clean_up()` because global handler calls it. It also allows them to be caught. Signed-off-by: Tin Švagelj <[email protected]>
github-actions
bot
added
lua
related to Lua integration in conky
cairo
related to cairo (2D graphics library)
labels
May 4, 2024
Caellian
force-pushed
the
dev/improve-termination
branch
from
May 4, 2024 14:46
4828216
to
eeccc71
Compare
Separate logger from logging header. Signed-off-by: Tin Švagelj <[email protected]>
Caellian
force-pushed
the
dev/improve-termination
branch
5 times, most recently
from
May 4, 2024 15:03
548351b
to
457ce1b
Compare
Signed-off-by: Tin Švagelj <[email protected]>
Caellian
force-pushed
the
dev/improve-termination
branch
from
May 4, 2024 15:11
457ce1b
to
d467576
Compare
Fix runtime crash Signed-off-by: Tin Švagelj <[email protected]>
brndnmtthws
approved these changes
May 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Massive improvement, thanks!
Defined a new format for variable/command related logs so it's clearer what they relate to. Signed-off-by: Tin Švagelj <[email protected]>
- Introduce very simple sink implementation for better formatting specialization. - Add colors. Signed-off-by: Tin Švagelj <[email protected]>
Signed-off-by: Tin Švagelj <[email protected]>
github-actions
bot
added
cpu
related to CPU stats or system process reporting
display: x11
related to X11 backend
display: wayland
related to Wayland backend
rendering
related to code that handles rendering, excluding the used graphics API
display: file
related to file backend
display: http
related to HTTP backend
disk io
related to disk I/O statistics
text
related to `conky.text` variables, their parsing or implementation
power
related to battery and power management code
labels
Jul 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build system
related to build system (CMake) and/or building process/assumptions
cairo
related to cairo (2D graphics library)
cpu
related to CPU stats or system process reporting
dependencies
adds or removes dependencies, or suggests alternatives
disk io
related to disk I/O statistics
display: file
related to file backend
display: http
related to HTTP backend
display: wayland
related to Wayland backend
display: x11
related to X11 backend
feature
suggest addition of new functionality that isn't currently supported in any way
lua
related to Lua integration in conky
nvidia
related to Nvidia GPU information reporting
os: macos
related to MacOS
power
related to battery and power management code
rendering
related to code that handles rendering, excluding the used graphics API
sources
PR modifies project sources
text
related to `conky.text` variables, their parsing or implementation
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.
This PR tackles following issues:
exit
(onCRIT_ERR
) and the same semantics are used for user error, system error and developer error (bugs).abort
,exit
doesn't produce a core dump which adds extra steps to figuring out what the problems are.std::terminate()
isn't used often enough, even though it's safer thanabort
(concurrency).std::terminate()
allows us to dump stack traces on errors.Changes
#define
d to use the new ones.syslog.h
, which forwards logs to system journal./tmp/conky.log
file output.DEBUG
define to avoid conflictsNDEBUG
(inverse), so this also simplifies build configuration.Add support for printing stack traces onstd::terminate()
.abort
handling. Regular stack trace printing with abort is very inconvenient.CRIT_ERR
andNORM_ERR
calls.