go get logur.dev/adapter/apex
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)
}
When all coding and testing is done, please run the test suite:
$ make check
The MIT License (MIT). Please see License File for more information.