logging

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// VerboseFlag enables verbose logging if set to true.
	VerboseFlag bool
	// VeryVerboseFlag enables very verbose logging if set to true.
	VeryVerboseFlag bool
	// Verbose is this package's verbose Logger.
	Verbose *log.Logger
	// VeryVerbose is this package's very verbose Logger.
	VeryVerbose *log.Logger
	// Error is this package's error Logger.
	Error *log.Logger
)
View Source
var CurLog = LogOut{
	MesosRequests:     &LogCounter{},
	MesosSuccess:      &LogCounter{},
	MesosNXDomain:     &LogCounter{},
	MesosFailed:       &LogCounter{},
	NonMesosRequests:  &LogCounter{},
	NonMesosSuccess:   &LogCounter{},
	NonMesosNXDomain:  &LogCounter{},
	NonMesosFailed:    &LogCounter{},
	NonMesosForwarded: &LogCounter{},
}

CurLog is the default package level LogOut.

Functions

func PrintCurLog

func PrintCurLog()

PrintCurLog prints out the current LogOut and then resets

func SetupLogs

func SetupLogs()

SetupLogs provides the following logs Verbose = optional verbosity VeryVerbose = optional verbosity Error = stderr

Types

type Counter

type Counter interface {
	Inc()
}

Counter defines an interface for a monotonically incrementing value.

type LogCounter

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

LogCounter implements the Counter interface with a uint64 register. It's safe for concurrent use.

func (*LogCounter) Inc

func (lc *LogCounter) Inc()

Inc increments the counter by one.

func (*LogCounter) String

func (lc *LogCounter) String() string

String returns a string represention of the counter.

type LogOut

type LogOut struct {
	MesosRequests     Counter
	MesosSuccess      Counter
	MesosNXDomain     Counter
	MesosFailed       Counter
	NonMesosRequests  Counter
	NonMesosSuccess   Counter
	NonMesosNXDomain  Counter
	NonMesosFailed    Counter
	NonMesosForwarded Counter
}

LogOut holds metrics captured in an instrumented runtime.

Jump to

Keyboard shortcuts

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