Skip to content

kpfaulkner/azuretablehook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Azure Table Storage Hooks for Logrus

Usage

package main

import (
	log "github.com/sirupsen/logrus"
	"github.com/kpfaulkner/azuretablehook"
	)

func main() {

    // Azure Storage keys can either be provided in the NewHook method or it will be read from environment variables
    // ACCOUNT_NAME and ACCOUNT_KEY
    log.AddHook( atshook.NewHook("XXXXX Azure account name XXXX", "XXXX Azure account key XXXXX", "mylogtable", 
    log.DebugLevel) )
    log.SetLevel( log.DebugLevel)

    log.WithFields(log.Fields{
        "species": "cat",
        "name" :"fred",
        "number": 1,
    }).Info("A cat was here")
}

About

Azure Table Storage hook for Logrus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages