Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 827 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 827 Bytes

zaphandler

zaphandler will help to create slog handler using zap logger Go Reference Report Card

Example:

package main

import (
    "log/slog"

    "go.mrchanchal.com/zaphandler"
    "go.uber.org/zap"
)

func main() {
    zapL, _ := zap.NewDevelopment()
    defer zapL.Sync()

    logger := slog.New(zaphandler.New(zapL))

    logger.Info("sample log message", "field1", "value1", "field2", 33)
}

Go Playground