Skip to content

ma-hartma/watermill-logrus-adapter

Repository files navigation

Watermill Logrus Adapter

An adapter for using watermill with logrus logger.


Installation

go get github.com/ma-hartma/watermill-logrus-adapter

Use LogrusLoggerAdapter

package main

import (
    wla "github.com/ma-hartma/watermill-logrus-adapter"
	"github.com/sirupsen/logrus"
)

func main() {
    // create a logrus logger instance
    log := logrus.New()

    // pass the logrus logger instance to NewLogrusLogger
    // to get your LoggerAdapter
    var logger watermill.LoggerAdapter
    logger = wla.NewLogrusLogger(log)

    // you can now use the logger with watermill
    ...
}

License

MIT

About

An adapter for using watermill with logrus logger.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages