Skip to content

logur/adapter-apex

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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