Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

hashamali/gsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gsl: Structure Logging Interface

godoc sec go-report license

A small opinionated log interface for Go for structured logging. Only supports 2 types of logs:

  • Info: For informational logging.
  • Error: For error logging.

API

The gsl.Log interface exposes the following methods:

  • With(fields map[string]interface{}) GGLog: Provide a new logger that will include the fields in subsequent logs.
  • Info(message string): Log the provided message at the info level.
  • Infof(format string, v ...interface{}): Format and log the provided message at the info level.
  • Infow(fields map[string]interface{}, message string): A shortened version of With(fields).Info(message).
  • Infofw(fields map[string]interface{}, format string, v ...interface{}): A shortened version of With(fields).Infof(message, v...).
  • Error(message string): Log the provided message at the error level.
  • Errorf(format string, v ...interface{}): Format and log the provided message at the error level.
  • Errorw(fields map[string]interface{}, message string): A shortened version of With(fields).Error(message).
  • Errorfw(fields map[string]interface{}, format string, v ...interface{}): A shortened version of With(fields).Errorf(message, v...).
  • V(verbosity int) bool: Determine if the provided verbosity is supported.

Implementations

About

gsl is a structured logging interface for Go.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages