package
0.1.0
Repository: https://github.com/xmlking/grpc-starter-kit.git
Documentation: pkg.go.dev

# README

Logger

This logger basically configure zerolog so that you can log via github.com/rs/zerolog/log

Usage

Import shared/logger package. It will be self-initialized.

import  "github.com/xmlking/grpc-starter-kit/internal/logger"

Once logger is initialized, then you can use standard github.com/rs/zerolog/log package's helper methods to log in your code.

Environment Variables

Your can set Logger config via Environment Variables

grpc internal logs also adopt CONFIG_LOG_LEVEL and CONFIG_LOG_FORMAT

No need to set GRPC_GO_LOG_SEVERITY_LEVEL and GRPC_GO_LOG_VERBOSITY_LEVEL

CONFIG_LOG_LEVEL=<trace,debug,info,warn,error,fatal,panic>
CONFIG_LOG_FORMAT=<pretty/json/gcp>

Test

CONFIG_LOG_LEVEL=info CONFIG_LOG_FORMAT=json go test github.com/xmlking/grpc-starter-kit/internal/logger  -count=1

# Packages

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

# Functions

Helper functions on DefaultLogger.
No description provided by the author
No description provided by the author
ReportCaller set value to `true`.
No description provided by the author
WithFields set default fields for the logger.
WithFormat set default log format for the logger.
WithLevel set default level for the logger.
WithOutput set default output writer for the logger.
WithTimeFormat set default timeFormat for the logger.

# Constants

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

# Variables

Default Logger.

# Structs

No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

Log format enum.
No description provided by the author