Categorygithub.com/hertz-contrib/logger/slog
modulepackage
1.0.0
Repository: https://github.com/hertz-contrib/logger.git
Documentation: pkg.go.dev

# README

Hertz Slog (This is a community driven project)

Introduction

This is a logger library that uses slog to implement the Hertz logger interface

Usage

Download and install it:

go get github.com/hertz-contrib/logger/slog

Import it in your code:

import hertzslog "github.com/hertz-contrib/logger/slog"

Simple Example:

package main

import (
	"context"

	"github.com/cloudwego/hertz/pkg/common/hlog"
	hertzslog "github.com/hertz-contrib/logger/slog"
)

func main() {
	logger := hertzslog.NewLogger()
	hlog.SetLogger(logger)

	...

	hlog.CtxInfof(context.Background(), "hello %s", "hertz")
}

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Logger slog impl.

# Interfaces

No description provided by the author