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

Conduit: Duplicate logger output #1245

Closed
winder opened this issue Sep 27, 2022 · 0 comments
Closed

Conduit: Duplicate logger output #1245

winder opened this issue Sep 27, 2022 · 0 comments
Assignees
Labels
bug Something isn't working Team Lamprey

Comments

@winder
Copy link
Contributor

winder commented Sep 27, 2022

When starting Conduit with no arguments, there are duplicate error outputs:

{"__type":"Conduit","_name":"main","level":"info","msg":"Data Directory:  ","time":"2022-09-16T15:50:51-04:00"}
Error: supplied data directory was empty
ERRO[0000] supplied data directory was empty

Some initial investigation:

The first line is us trying to log the config after we've loaded it: https://github.com/algorand/indexer/blob/conduit/cmd/conduit/main.go#L69

The Error message is the validity function finding the data directory in the config empty: https://github.com/algorand/indexer/blob/conduit/conduit/config.go#L27

And the third line is probably from https://github.com/algorand/indexer/blob/conduit/cmd/conduit/main.go#L122
Seems like we've got a bunch of duplicate logs of the same thing I guess? Since we are using a logger initialized in the init function we should probably always be using that.

We are also using RunE instead of Run in conduit, which is probably where one of the error outputs comes from. But it is not clear to me why the format is different.

@winder winder added Team Lamprey bug Something isn't working labels Sep 27, 2022
AlgoStephenAkiki added a commit that referenced this issue Oct 3, 2022
Resolves #1245

Explicitly spell out empty data directory as well as condensed error
messages when running conduit
AlgoStephenAkiki added a commit that referenced this issue Oct 5, 2022
Resolves #1245

Explicitly spell out empty data directory as well as condensed error
messages when running conduit
AlgoStephenAkiki added a commit that referenced this issue Oct 12, 2022
Resolves #1245

Adds a multi-threaded logger instance for conduit usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team Lamprey
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants