Skip to content

Easy use example: logging to file doesn't work & gives the following error: "zerolog: could not write event: short write" #1

@erezpaz125

Description

@erezpaz125

Hi,

I tried using the easy use example, only without using Sentry.
Here is the exact code I used and saved in a file I named main2.go -
image

Upon running the code I see the following outcome:

  1. The expected log is printed to StdOut.
  2. The log file I expected to see created (/home/sio/Desktop/block-lcm-starter/mylog.log) Is NOT created.
  3. an error appears in the terminal below the log that was printed to StdOut. This can be seen in the following screenshot:
    image

I wanted to ask if you are aware of the issues mentioned in 2. & 3. and if there is an expected fix.

Hoping to be able to use this at work.
Thank you,
Erez

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