slacklog

package
v1.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlackWriter

type SlackWriter struct {
	log.LogFilter
	log.LogFormatter
	log.SubFormatter

	Webhook string
	Timeout time.Duration
}

SlackWriter implements log Writer Interface and send log message to slack.

func (*SlackWriter) Close

func (sw *SlackWriter) Close()

Close implementing method. empty.

func (*SlackWriter) Flush

func (sw *SlackWriter) Flush()

Flush implementing method. empty.

func (*SlackWriter) SetTimeout

func (sw *SlackWriter) SetTimeout(timeout string) error

SetTimeout set timeout

func (*SlackWriter) SetWebhook

func (sw *SlackWriter) SetWebhook(webhook string) error

SetWebhook set the webhook URL

func (*SlackWriter) Write

func (sw *SlackWriter) Write(le *log.Event) (err error)

Write send log message to slack

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL