Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

go-packagist/go-kratos-log-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-kratos-log-stack

Go Version GoDoc codecov Go Report Card tests MIT license

Installation

go get github.com/go-packagist/go-kratos-log-stack

Usage

package main

import (
	"os"

	"github.com/go-kratos/kratos/v2/log"
	stack "github.com/go-packagist/go-kratos-log-stack"
)

func main() {
	logger := stack.New([]log.Logger{
		log.NewStdLogger(os.Stdout),
		log.NewStdLogger(os.Stdout),
	})

	log.SetLogger(logger)

	log.Info("test", "test")
	// Print:
	// INFO msg=testtest
	// INFO msg=testtest
}

License

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