package
4.0.2-stable+incompatible
Repository: https://github.com/algorand/go-algorand.git
Documentation: pkg.go.dev
# Packages
Package logspec specifies the data format of event log statements.
No description provided by the author
# Functions
Base returns the default Logger logging to.
CollectAndUploadData combines all of the data files that we want packaged up and uploaded for analysis and uploads the tarball to S3.
EnableTelemetry configures and enables telemetry based on the config provided.
EnsureTelemetryConfig creates a new TelemetryConfig structure with a generated GUID and the appropriate Telemetry endpoint Err will be non-nil if the file doesn't exist, or if error loading.
EnsureTelemetryConfigCreated is the same as EnsureTelemetryConfig but it also returns a bool indicating whether EnsureTelemetryConfig had to create the config.
Init needs to be called to ensure our logging has been initialized.
LoadTelemetryConfig loads the TelemetryConfig from the config file.
MakeCyclicFileWriter returns a writer that wraps a file to ensure it never grows too large.
NewLogger returns a new Logger logging to out.
NewWrappedLogger returns a new Logger that wraps an external logrus logger.
ReadTelemetryConfigOrDefault reads telemetry config from file or defaults if no config file found.
RegisterExitHandler registers a function to be called on exit by logrus Exit handling happens when logrus.Exit is called, which is called by logrus.Fatal.
SanitizeTelemetryString applies sanitization rules and returns the sanitized string.
TelemetryOverride Determines whether an override value is set and what it's value is.
TestingLog is a test-only convenience function to configure logging for testing.
TestingLogWithoutFatalExit is a test-only convenience function to configure logging for testing in situations where Fatal() may be called (e.g.
UsageLogThread utility logging method.
# Variables
TelemetryConfigFilename default file name for telemetry config "logging.config".
# Structs
CyclicFileWriter implements the io.Writer interface and wraps an underlying file.
MarshalingTelemetryConfig is used for json serialization of the TelemetryConfig so that we could replace the MinLogLevel/ReportHistoryLevel with our own types.
TelemetryConfig represents the configuration of Telemetry logging.
TestLogWriter is an io.Writer that wraps a testing.T (or a testing.B) -- anything written to it gets logged with t.Log(...) Being an io.Writer lets us pass it to Logger.SetOutput() in testing code -- this way if we want we can use Go's built-in testing log instead of making a new base.log file for each test.
# Interfaces
Logger is the interface for loggers.