-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
Issue or PR that affects dependencies
build system
Issues and PRs related to build system (CMake) and process
os: macos
Issue or PR 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
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
Issue or PR related to Lua code
cairo
Issue or PR related to cairo
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
Issue or PR that's related to CPU or process tracking
display: x11
Issue related to X11 backend
display: wayland
Issue related to Wayland backend
rendering
Issue or PR related to rendering
display: file
Issue or PR related to file backend
display: http
Issue or PR related to HTTP backend
disk io
Issue or PR that suggests changes to disk I/O
text
Issue or PR related to `conky.text` variables
power
Issue or PR 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
Issues and PRs related to build system (CMake) and process
cairo
Issue or PR related to cairo
cpu
Issue or PR that's related to CPU or process tracking
dependencies
Issue or PR that affects dependencies
disk io
Issue or PR that suggests changes to disk I/O
display: file
Issue or PR related to file backend
display: http
Issue or PR related to HTTP backend
display: wayland
Issue related to Wayland backend
display: x11
Issue related to X11 backend
feature
New feature PR or issue
lua
Issue or PR related to Lua code
nvidia
Issue or PR related to nvidia cards
os: macos
Issue or PR related to MacOS
power
Issue or PR related to battery and power management code
rendering
Issue or PR related to rendering
sources
PR modifies project sources
text
Issue or PR related to `conky.text` variables
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.