Skip to content
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(logs): configure log format #322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aali309
Copy link
Contributor

@aali309 aali309 commented Dec 18, 2023

fixes: #39

@aali309 aali309 added feat New feature or request safe-to-test labels Dec 18, 2023
Copy link

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-322-d4b589f884cb877dc2ff2bad9acdff09bf9e9e23-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-322-d4b589f884cb877dc2ff2bad9acdff09bf9e9e23-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-322-d4b589f884cb877dc2ff2bad9acdff09bf9e9e23-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-322-d4b589f884cb877dc2ff2bad9acdff09bf9e9e23-linux-arm64 sh smoketest.sh

@andrewazores
Copy link
Member

/build_test

@andrewazores
Copy link
Member

andrewazores commented Dec 18, 2023

I'm not sure this is quite the right approach - rather than the configuration only allowing for booleans of whether information should be included in the output or not, it would be more flexible and more conventional to use formatting specifiers, so the configuration should be set as ex. an environment variable that looks like LOG_FMT="[%t] (%l) %m", where %t would be replaced by the timestamp, %l by the log level, %m by the log message, for example. This way it is a configuration time change, rather than something that must be done by changing source code and rebuilding, too.

Regardless, this is a pretty low priority request - it has been open for 3.5 years and hasn't really been a real problem, so I would rather we focus our efforts on more immediately fruitful development :-)

Copy link

Cryostat Test: All tests pass ✅
https://github.com/cryostatio/cryostat-core/actions/runs/7254110638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
No open projects
Status: Stretch Goals
Development

Successfully merging this pull request may close these issues.

Log format should be configurable
2 participants