-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: structured logging (JSON) #5118
Open
SapphicCode
wants to merge
6
commits into
louislam:master
Choose a base branch
from
SapphicCode:feat/structured-logging
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
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
…log` Co-authored-by: Frank Elsinga <[email protected]> Closes: louislam#4391 Squashed commit of the following: commit 828d2a7 Merge: 10f771c dd75890 Author: Frank Elsinga <[email protected]> Date: Fri Sep 13 22:51:25 2024 +0800 Merge branch 'master' into deprecations commit 10f771c Author: Frank Elsinga <[email protected]> Date: Thu Jan 18 22:36:12 2024 +0100 formatting fixes commit d737b19 Author: Frank Elsinga <[email protected]> Date: Thu Jan 18 21:27:30 2024 +0100 migrated all settings to use the `Settings` class commit c5e26e9 Author: Frank Elsinga <[email protected]> Date: Thu Jan 18 21:04:44 2024 +0100 removed the deprecated logging functionality
Co-authored-by: Frank Elsinga <[email protected]> Closes: louislam#4392 Squashed commit of the following: commit 75c4c35 Merge: 14e3c3c dd75890 Author: Frank Elsinga <[email protected]> Date: Fri Sep 13 22:46:21 2024 +0800 Merge branch 'master' into unified-logging-infrastructure commit 14e3c3c Merge: d622dfb c919d2c Author: Frank Elsinga <[email protected]> Date: Mon Jun 3 16:00:56 2024 +0200 Merge branch 'master' into unified-logging-infrastructure commit d622dfb Author: Frank Elsinga <[email protected]> Date: Thu Jan 18 22:31:10 2024 +0100 unified our logging infrastructure
Includes a slight refactor in the console logging section, to achieve an unformatted output and reduce complexity. Resolves: louislam#5107
Resolves the following trace: Trace: TypeError: Cannot convert object to primitive value at res.end (<snip>/uptime-kuma/server/modules/apicache/apicache.js:308:64) at ServerResponse.send (<snip>/uptime-kuma/node_modules/express/lib/response.js:233:10) at ServerResponse.json (<snip>/uptime-kuma/node_modules/express/lib/response.js:279:15) at module.exports.sendHttpError (<snip>/uptime-kuma/server/util-server.js:806:25) at <snip>/uptime-kuma/server/routers/status-page-router.js:58:9 at process.unexpectedErrorHandler (<snip>/uptime-kuma/server/server.js:1858:13) at process.emit (node:events:519:28) at emitUnhandledRejection (node:internal/process/promises:250:13) at throwUnhandledRejectionsMode (node:internal/process/promises:385:19) at processPromiseRejections (node:internal/process/promises:470:17) at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
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.
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Implements structured logging, as requested by #5107.
Resolves #5107
This feature can be enabled by using the environment variable
UPTIME_KUMA_LOG_FORMAT
set tojson
.This PR also incorporates the work of #4391 and #4392 (with minor fixes to both as per the linter), for the feature itself I would direct your attention to commit 3e922be.
Closes #4391
Closes #4392
Type of change
Please delete any options that are not relevant.
Before
After
Checklist