Not working inside docker image
- Dominant language
- Go
- Stars
- 890
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Logger library is working as expected in `Linux (Ubuntu 18.04 LTS) ` and in `Mac os` but
when I am running it in docker having `alpine Linux` as a base image, it is stuck at
```go
logger.Init("foo", *verbose, true, lf)
```
I am using its latest version by downloading it using `go get github.com/google/logger`
It's blocking the entire application as the `func logger.Init()` is not returning.
My implementation:
```go
func mustInitLogger() *logger.Logger {
fmt.Printf("initializing x-microservice application log\n")
lf, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
if err != nil {
panic(err)
}
fmt.Printf("log file created, initializing x-microservice logger instance\n")
logr := logger.Init("x-microservice", true, true, lf)
logger.SetFlags(log.LstdFlags)
fmt.Printf("log initialization done\n")
return logr
}
```
**Update**:
When I switched to version `v1.0.1`, I get this error:
`unix syslog delivery error`
Contributor guide
Assessment
This issue has not been assessed yet.