Skip to content

zaphandler will help to create slog handler using zap logger

License

Notifications You must be signed in to change notification settings

chanchal1987/zaphandler

Repository files navigation

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

About

zaphandler will help to create slog handler using zap logger

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published