Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fachryansyah/go-logger-discord
A logger for golang send over discord channel
https://github.com/fachryansyah/go-logger-discord
Last synced: 22 days ago
JSON representation
A logger for golang send over discord channel
- Host: GitHub
- URL: https://github.com/fachryansyah/go-logger-discord
- Owner: fachryansyah
- Created: 2021-07-19T14:39:12.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-19T14:58:49.000Z (over 3 years ago)
- Last Synced: 2024-06-20T15:03:00.017Z (6 months ago)
- Language: Go
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Go logger Discord
A golang logger send over discord channel
![Preview](https://github.com/fachryansyah/go-logger-discord/blob/master/ss.png)# Instalation
```bash
$ go get github.com/fachryansyah/go-logger-discord
```# Usage
Simply setting your auth config for initial logger
```go
package mainimport (
dscrdlog "github.com/fachryansyah/go-logger-discord"
)func main() {
log := dscrdlog.Init(dscrdlog.AuthConfig{
Token: "your token",
Type: "Bot",
}, "your channel id")log.Error(
"a message",
"a title of error",
"a description of error",
"url refrence"
)
}
```# API
| Name | Description |Return |
| ----------------|---------------------------|-------|
| `log.Error()` | log an error | error |
| `log.Info()` | log an information | error |
| `log.Success()` | log an something success | error |
| `log.Fatal()` | log an fatal error | error |
| `log.Warn()` | log an warning message | error |