ssmlog

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 12

Documentation

Overview

Package ssmlog is used to initialize ssm functional logger

Package ssmlog is used to initialize ssm functional logger

Package ssmlog is used to initialize ssm functional logger

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUpdaterLogger

func GetUpdaterLogger(logRoot string, logFile string) log.T

GetUpdaterLogger loads logger for agent updater

func SSMLogger

func SSMLogger(useWatcher bool) log.T

Types

type CloudWatchCustomReceiver

type CloudWatchCustomReceiver struct {
}

CloudWatchCustomReceiver implements seelog.CustomReceiver

func (*CloudWatchCustomReceiver) AfterParse

func (logReceiver *CloudWatchCustomReceiver) AfterParse(initArgs seelog.CustomReceiverInitArgs) error

AfterParse extracts the log group and stream from the XML args and sets them in a new log data facade instance

func (*CloudWatchCustomReceiver) Close

func (logReceiver *CloudWatchCustomReceiver) Close() error

Close clears the queue being used.

func (*CloudWatchCustomReceiver) Flush

func (logReceiver *CloudWatchCustomReceiver) Flush()

Flush flush the logs in the queue

func (*CloudWatchCustomReceiver) ReceiveMessage

func (logReceiver *CloudWatchCustomReceiver) ReceiveMessage(message string, level seelog.LogLevel, context seelog.LogContextInterface) error

ReceiveMessage Enqueues the new message to the queue

type FileWatcher

type FileWatcher struct {
	// contains filtered or unexported fields
}

FileWatcher implements the IFileWatcher by using fileChangeWatcher and fileExistsWatcher

func (*FileWatcher) Init

func (fileWatcher *FileWatcher) Init(log log.T, configFilePath string, replaceLogger func())

Init initializes the data and channels for the filewatcher

func (*FileWatcher) Start

func (fileWatcher *FileWatcher) Start()

Start creates and starts the go routines for filewatcher

func (*FileWatcher) Stop

func (fileWatcher *FileWatcher) Stop()

Stop stops the filewatcher

type IFileWatcher

type IFileWatcher interface {
	Init(log log.T, configFilePath string, replaceLogger func())
	Start()
	Stop()
}

IFileWatcher interface for FileWatcher with functions to initialize, start and stop the watcher

Jump to

Keyboard shortcuts

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