An open API service indexing awesome lists of open source software.

https://github.com/tsarpaul/logrus_sqs

A Logrus hook for Amazon Simple Queue Service (SQS)
https://github.com/tsarpaul/logrus_sqs

go golang logging logrus logrus-hook plugin

Last synced: 5 months ago
JSON representation

A Logrus hook for Amazon Simple Queue Service (SQS)

Awesome Lists containing this project

README

          

# SQS Hook for [Logrus](https://github.com/Sirupsen/logrus) :walrus:

### Installation
> $ go get github.com/tsarpaul/logrus_sqs

### Usage
```
package main

import (
"github.com/Sirupsen/logrus"
"github.com/tsarpaul/logrus_sqs"
)

func main() {
sqsHook, err := logrus_sqs.NewSQSHook("random_queue_name", "eu-central-1")
if err != nil {
panic(err)
}
log.AddHook(sqsHook)

log.WithFields(log.Fields{
"hello": "world",
}).Info("Hello world!")
}
```

You may provide a custom AWS Session with `logrus_sqs.NewSQSHookWithSession`