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: Print logger messages to stdout in production #123

Conversation

jekabs-karklins
Copy link
Contributor

@jekabs-karklins jekabs-karklins commented Jan 2, 2023

Description

Print logger messages to stdout in production

Motivation and Context

Currently, you can only set one logger where to direct the logs.
For example for ESS in production, they are directed to Graylog.

This PR adds the ability to define multiple loggers, and all of them will be invoked when calling any of the ILogger methods.

This allows adding both Graylog and ConsoleLogger in the production, and Since console.log for NodeJS implementation is sending the stream to stdout it will appear when inspecting container logs.

If running In kubernetes this will now display the logger messages
kubectl logs
That should allow debugging issues quicker

How Has This Been Tested

Added unit tests for the library
Manually tested useroffice core for all scenarios

Fixes

https://jira.esss.lu.se/browse/SWAP-2884

Changes

Configuring logger with the new signature

Depends on

N/A

@jekabs-karklins jekabs-karklins requested a review from a team as a code owner January 2, 2023 08:25
@jekabs-karklins jekabs-karklins requested review from simonfernandes and removed request for a team January 2, 2023 08:25
@jekabs-karklins jekabs-karklins changed the title Swap 2884 add ability to configure multiple loggers for duo feat: Print logger messages to stdout in production Jan 2, 2023
@jekabs-karklins jekabs-karklins enabled auto-merge (squash) January 12, 2023 12:58
@jekabs-karklins jekabs-karklins merged commit 20c5010 into develop Jan 23, 2023
@jekabs-karklins jekabs-karklins deleted the SWAP-2884-add-ability-to-configure-multiple-loggers-for-duo- branch January 23, 2023 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants