grpc

package module
v0.0.0-...-7e9762e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 1 Imported by: 0

README

grpc

Go Reference Go Report Card

A grpc LoggerV2 implementation.

Usage

import (
    "github.com/phuslu/log-contrib/grpc"
    "github.com/phuslu/log"
)

func main() {
    logger := grpc.New(&log.Logger{
        Level:      log.InfoLevel,
        TimeFormat: "15:04:05",
        Caller:     1,
        Writer: &log.ConsoleWriter{
            ColorOutput:    true,
            QuoteString:    false,
            EndWithMessage: false,
        },
    })

    logger.Info("Grpc in action!", "the answer", 42)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(l *log.Logger) (g *logger)

New wraps the log.Logger to provide a LoggerV2 logger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL