https://github.com/setlog/alert
https://github.com/setlog/alert
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/setlog/alert
- Owner: setlog
- License: mit
- Created: 2021-05-14T09:18:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:50:14.000Z (about 2 years ago)
- Last Synced: 2024-06-20T03:46:00.893Z (over 1 year ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Alert
Send alert mails, configured via environment variables. UNIX only. Requires `/usr/sbin/sendmail`.
```sh
export ALERT_MAIL_RECIPIENT=alert@example.com
export ALERT_MAIL_SENDER=service@example.com
export ALERT_MAIL_TITLE_PREFIX=[PRODUCTION]
```
```golang
import "github.com/setlog/alert"
func main() {
alert.Mail("Import failed!", "Failed to parse line %d", 42) // fmt.Sprintf-style formatting.
}
```