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

Docker stderr #23

Open
wants to merge 4 commits into
base: 1.12
Choose a base branch
from
Open

Docker stderr #23

wants to merge 4 commits into from

Conversation

yowayb
Copy link

@yowayb yowayb commented Jan 23, 2022

Summary of change

When running in a container without $ERROR_LOG_PATH specified, this change will now print errors to stderr.

Related issues

Test Plan

  1. Run container with incorrect port: sudo docker run --network="host" -p 3567:3567 -v $HOME/Development/supertokens/docker-logs:/home/logs -e MYSQL_HOST="127.0.0.1" -e MYSQL_PORT="3307" -e INFO_LOG_PATH="/home/logs/info.log" supertokens 2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
  2. Confirm error in red

image

Documentation changes

None

Checklist for important updates

  • Changelog has been updated
  • pluginInterfaceSupported.json file has been updated (if needed)
  • Changes to the version if needed
    • In build.gradle
  • Had installed and ran the pre-commit hook
  • If there are new dependencies that have been added in build.gradle, please make sure to add them in implementationDependencies.json.
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.

Remaining TODOs for this PR

None

@yowayb
Copy link
Author

yowayb commented Jan 23, 2022

I did something wrong here. I don't know why it's showing all these other commits.

@rishabhpoddar rishabhpoddar changed the base branch from 1.9 to 1.12 January 23, 2022 11:47
@rishabhpoddar
Copy link
Contributor

Changes look good. The reason why the other commits were showing is cause the target branch was 1.9, but the latest is 1.12. I have fixed that and now the commits are as expected.

I'll merge this when the other plugins have this change as well :)

@@ -129,7 +129,7 @@ public void setName(String name) {
@Override
public void doAppend(ILoggingEvent event) throws LogbackException {
if (event.getLevel() == Level.ERROR) {
Logging.error(start, event.getFormattedMessage(), false);
Logging.error(start, event.getFormattedMessage(), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what kind of error logs are sent by Hikari and how often?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are the logged errors I found in HikariCP:

"Property {} does not exist on target {}"
"{} - JMX name ({}) is already registered."
"{} - Failed to execute{} connection test query ({})."
"Failed to load driver class {} from HikariConfig class classloader {}"
"{} - Error thrown while acquiring connection from data source"

They appear to be entirely configuration and connection errors, so I wouldn't expect them to appear often.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Alright then! This seems fine for now. I'll investigate this a bit more though.

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