Skip to content

logur/adapter-apex

Repository files navigation

Logur adapter for apex/log

GitHub Workflow Status Codecov Go Report Card Go Version go.dev reference

Installation

go get logur.dev/adapter/apex

Usage

With no initial context:

package main

import (
  apexadapter "logur.dev/adapter/apex"
)

func main() {
  logger := apexadapter.New()
}

With existing fields:

package main

import (
  "github.com/apex/log"
  apexadapter "logur.dev/adapter/apex"
)

func main() {
  logger := apexadapter.NewFromFields(log.Fields{
    "hostname": "localhost",
  })
}

With an existing entry:

package main

import (
  "github.com/apex/log"
  apexadapter "logur.dev/adapter/apex"
)

func main() {
  entry := log.WithFields(log.Fields{
    "hostname": "localhost",
  })

  logger := apexadapter.NewFromEntry(entry)
}

Development

When all coding and testing is done, please run the test suite:

$ make check

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published