Skip to content

Conversation

@rgeraldes
Copy link
Contributor

Closes #817

@rgeraldes rgeraldes changed the title knode: added support for different loggers knode/validator: context logger w/ custom handlers; replaced log.Warn w/ log.Crit if sync fails Oct 8, 2018
txConfirmationTimeout = 10 * time.Second

// log handlers
fileHandler = log.Must.FileHandler("/var/log/validator_all.log", log.LogfmtFormat())
Copy link
Contributor

Choose a reason for hiding this comment

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

It can break non-unix clients or clients with no access to /var/log

Copy link
Contributor

Choose a reason for hiding this comment

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

agree, this needs to be configurable and passed down from main comand

func (val *validator) sync() {
if err := SyncWaiter(val.eventMux); err != nil {
log.Warn("Failed to sync with network", "err", err)
val.logger.Crit("Failed to sync with network", "err", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this now Critical?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we can't start the validation without syncing

Copy link
Contributor

Choose a reason for hiding this comment

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

that doesn't mean we should kill the client, can we return nil or not starting vlidation process

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current flow is a one shot type of thing and we will need to modify the flow to take that into account. I will open a separate issue for that problem.

Copy link
Contributor

@JekaMas JekaMas left a comment

Choose a reason for hiding this comment

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

lgtm

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.

5 participants