tail icon indicating copy to clipboard operation
tail copied to clipboard

Add error message to logs

Open AndersBennedsgaard opened this issue 1 year ago • 0 comments

Describe the bug

When errors occur, it is important to get the error message logged out. Otherwise it can get very annoying to debug. I have for example hit the following error:

https://github.com/nxadm/tail/blob/ba755e4d73b6b3e768ccb943df8d4656cdd971fc/watch/inotify_tracker.go#L220

I don't know why fsnotify.NewWatcher() would fail, but since the error message isn't included in the error log, it is almost impossible to debug.

Expected behaviour

I would expect the error message is a part of the logs using something like the following:

util.Fatal(fmt.Sprintf("failed to create Watcher: %v", err))

Additional context

I actually came onto this error by using https://github.com/hpcloud/tail which is used in https://github.com/kubeflow/katib.

AndersBennedsgaard avatar Apr 04 '24 12:04 AndersBennedsgaard