Skip to content

Add error message to logs #68

@AndersBennedsgaard

Description

@AndersBennedsgaard

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:

util.Fatal("failed to create Watcher")

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions