Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Conversation

@avelanarius
Copy link
Member

@avelanarius avelanarius commented Mar 3, 2025

It turns out that JUST IMPORTING Vitess messes up logging in the entire application.

Vitess code in its init() function (called before our main) redirects stderr logging into its own logging implementation (which doesn't print anything for us): https://github.com/vitessio/vitess/blob/41a8d1dd323fb56e9dce88b29c64f9dc87b5a0fe/go/vt/logutil/logutil.go#L17-L18

For now, I just commented out the code that imported (and used) Vitess.

Before the fix, if the config validation failed, it wouldn't print the cause of the failure. After this fix, the cause is now properly printed out:

               ________
               \_____  \  __ __   ____   ______ _____ _____
                /  / \  \|  |  \_/ __ \ /  ___//     \\__  \
               /   \_/.  \  |  /\  ___/ \___ \|  Y Y  \/ __ \_
               \_____\ \_/____/  \___  >____  >__|_|  (____  /
                      \__>           \/     \/      \/     \/

2025/03/03 19:18:14 Config validation failed: 2 errors occurred:
	* no frontend connectors defined
	* no pipelines defined, must define at least one

It turns out that JUST IMPORTING Vitess messes up logging in the entire
application.

Vitess code in its `init()` function (called before our `main`) redirects
stderr logging into its own logging implementation (which doesn't print
anything for us).

For now, I just commented out the code that imported (and used) Vitess.

Before the fix if the config validation failed, it wouldn't print
the cause of the failure. After this fix, the cause is now properly
printed out:

               ________
               \_____  \  __ __   ____   ______ _____ _____
                /  / \  \|  |  \_/ __ \ /  ___//     \\__  \
               /   \_/.  \  |  /\  ___/ \___ \|  Y Y  \/ __ \_
               \_____\ \_/____/  \___  >____  >__|_|  (____  /
                      \__>           \/     \/      \/     \/

2025/03/03 19:18:14 Config validation failed: 2 errors occurred:
	* no frontend connectors defined
	* no pipelines defined, must define at least one
@avelanarius avelanarius requested a review from a team as a code owner March 3, 2025 18:21
@trzysiek trzysiek enabled auto-merge March 3, 2025 18:23
@trzysiek trzysiek added this pull request to the merge queue Mar 3, 2025
Merged via the queue into QuesmaOrg:main with commit 8a32ac5 Mar 3, 2025
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants