Skip to content
 
 

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages