go-logdna

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: MIT

README

go-logdna

GoDoc Release Build Status Go Report Card Code Climate BCH compliance

Unofficial golang library for LogDNA.

Quick Usage

import (
	"github.com/evalphobia/go-logdna/logdna"
)

func someFunction() {
	conf := logdna.Config{
		APIKey:       "",
		App:          "myapp",
		Env:          "production",
		MinimumLevel: logdna.LogLevelInfo,
		Sync:         false,
		Debug:        true,
	}

	cli, err := logdna.New(conf)
	if err != nil {
		panic(err)
	}

	cli.Debug("logging...")
	cli.Trace("logging...")
	cli.Info("logging...")
	cli.Warn("logging...")
	cli.Err("logging...")
	cli.Fatal("logging...")
}

Environment variables

Name Description
LOGDNA_API_KEY API Key of LogDNA.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL