Skip to content
RevittCoPublic

About

Logging package for go

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Logger

License Release

Logger is a go package that provides a simple and easy to use logging interface. It is designed to be used in a variety of applications and provides a simple way to log messages.


Quick Start

go get github.com/RevittConsulting/logger

Features

  • Simple and easy to use
  • Get observed logs for testing
  • Loki support

Loki Configuration

Run this on app startup to enable loki logging.

InitLoggerConfig(&Config{
    LokiAddress: "http://localhost:3100",
    Labels:      map[string]string{"app": "My App", "env": "local"},
    UsingLoki:   true,
})

Log to file

Add these values to config

loggerCfg := &logger.Config{
    LogToFile:   true,
    LogFilePath: "log.txt",
}
logger.InitLoggerConfig(loggerCfg)

Contributing

Found a bug or want to suggest a feature? Feel free to create an issue or make a pull request.


About

Logging package for go

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages