Skip to content

tigerclawn82/logorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Logorithm

Logorithm is a Go package that provides a custom logger compatible with SoundCloud's logging infrastructure.

Usage

import "github.com/soundcloud/logorithm"
import "os"

...

logger := logorithm.New(os.Stdout, false, "SOFTWARE", "VERSION", "PROGRAM", os.Getpid())

// The following methods are available for each severity level
logger.Emerg("User id: %d", 12345)
logger.Alert("User id: %d", 12345)
logger.Critical("User id: %d", 12345)
logger.Error("User id: %d", 12345)
logger.Warning("User id: %d", 12345)
logger.Notice("User id: %d", 12345)
logger.Info("User id: %d", 12345)
logger.Debug("User id: %d", 12345)

Installing

From the root of the project run:

go install

Testing

go test

Conventions

This repository follows the code conventions dictated by gofmt. To automate the formatting process install this pre-commit hook, which runs gofmt and adds the files. Don't forget to make the file executable: chmod +x .git/hooks/pre-commit.

About

SoundCloud logging for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages