Skip to content

Basic L() log functionality doesn't work #1503

@Dentrax

Description

@Dentrax

Describe the bug
First-time Zap user here!

Zap doesn't print out any log when using L().

To Reproduce

  1. go mod init test
  2. go get go.uber.org/zap (v1.27.0)
  3. Create simplest main.go:
cat << EOF > main.go
package main
import "go.uber.org/zap"
func main() {
	zap.L().Debug("DEBUG")
	zap.L().Info("INFO")
	zap.L().Warn("WARN")
	zap.L().Fatal("FATAL")
}
EOF
  1. Run with go run main.go
  2. See exit status 1, and nothing else

I can't just do zap.Info() since there are no such way to call those methods without L().

Expected behavior
It should simply print out the logs in order.

Additional context
-

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions