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-syslog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-kratos-log-syslog

Go Version GoDoc codecov Go Report Card tests MIT license

Installation

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

Usage

package main

import (
	"github.com/go-kratos/kratos/v2/log"
	syslog "github.com/go-packagist/go-kratos-log-syslog"
)

func main() {
	s, err := syslog.New(&syslog.Config{
		Network: "udp",
		Tag:     "test",
		Addr:    "192.168.8.92:30732",
	})
	if err != nil {
		panic(err)
	}
	defer s.Close()

	s.Log(log.LevelDebug, "test", "test")
}

License

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