Warning
This project is archived and no longer maintained. Consider using log/slog instead.
Read more about why it was archived in this post.
go get logur.dev/adapter/apexWith 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 checkThe MIT License (MIT). Please see License File for more information.