admincclogger

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(l logger.Logger, dmer poster.DMer, logLevel logger.LogLevel, includeContext bool, userIDs ...string) logger.Logger

New promotes the provided logger into a admin cc logger, sending direct messages to all the admin ids provided through the dmer provided, about all events below the logLevel. If logVerbose is set, it will also send the context.

- l Logger: A logger to promote.

- dmer DMer: A DMer to send the messages to the admins.

- logLevel: The highest type of message to be stored in telemetry.

- includeContext: Whether the log context should be messaged to the admins.

- userIDs: The user IDs of the admins.

func NewFromAPI

func NewFromAPI(api common.LogAPI, dmer poster.DMer, logLevel logger.LogLevel, includeContext bool, userIDs ...string) logger.Logger

NewFromAPI creates a adminCCLogger directly from a LogAPI instead of passing a logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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