Skip to content

scor2k/go-vector-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Vector-Logger

An easy way to use Vector for logs in Go.

Usage

package main

import (
  "github.com/scor2k/go-vector-logger"
)

var logger VectorLogger

func main() {
  logger.Init("test-app", "info", "127.0.0.1", 10100)

  logger.Debug("test debug message")
  logger.Info("test info message")
  logger.Warn("test warning message")
  logger.Error("test error message")
  logger.Errorf("test error message with %s", "formatting")
}

About

Simple way to send logs to Loki

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages