slacklog

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 7 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.RetrySupport
	log.FilterSupport
	log.FormatSupport
	log.SubjectSuport

	Webhook string
	Timeout time.Duration
	// contains filtered or unexported fields
}

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

func (*SlackWriter) Close

func (sw *SlackWriter) Close()

Close flush and close.

func (*SlackWriter) Flush

func (sw *SlackWriter) Flush()

Flush retry send failed events.

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)

Write send log message to slack

Jump to

Keyboard shortcuts

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