Skip to content

bmorelli25/ecs-logging-go-zerolog

 
 

Repository files navigation

Elastic Common Schema (ECS) support for zerolog

Use this library for automatically adding a minimal set of ECS fields to your logs, when using zerolog.

Usage

package main

import (
	"os"

	"go.elastic.co/ecszerolog"
	"github.com/rs/zerolog/log"
)

func main() {
	logger := ecszerolog.New(os.Stdout)
	log.Logger = logger

	log.Info().Msg("Hello, World!")
}

Test

go test ./...

Contribute

Create a Pull Request from your own fork.

Run mage to update and format you changes before submitting.

Add new dependencies to the NOTICE.txt.

License

This software is licensed under the Apache 2 license.

About

Elastic Common Schema (ECS) support for zerolog.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%