package
0.18.4-beta.rc2
Repository: https://github.com/lightningnetwork/lnd.git
Documentation: pkg.go.dev
# Functions
IsDevBuild returns true if this is a development build.
IsProdBuild returns true if this is a production build.
NewPrefixLog instantiates a new prefixed logger.
NewRotatingLogWriter creates a new file rotating log writer.
NewShutdownLogger creates a shutdown logger for the log provided which will use the signal package to request shutdown on critical errors.
NewSubLogger constructs a new subsystem log from the current LogWriter implementation.
ParseAndSetDebugLevels attempts to parse the specified debug level and set the levels accordingly on the given logger.
Tags returns the list of build tags that were compiled into the executable.
Version returns the application version as a properly formed string per the semantic versioning 2.0.0 spec (http://semver.org/).
# Constants
AppMajor defines the major version of this binary.
AppMinor defines the minor version of this binary.
AppPatch defines the application patch for this binary.
AppPreRelease MUST only contain characters from semanticAlphabet per the semantic versioning spec.
Deployment specifies a production build.
Development is a deployment that includes extra testing hooks and logging configurations.
LoggingType is a log type that writes to both stdout and the log rotator, if present.
LogTypeDefault logs to both stdout and a given io.PipeWriter.
LogTypeNone indicates no logging.
LogTypeStdOut all logging is written directly to stdout.
Production is a deployment that strips out testing logic and uses Default logging.
# Variables
Commit stores the current commit of this build, which includes the most recent tag, the number of commits since that tag (if non-zero), the commit hash, and a dirty marker.
CommitHash stores the current commit hash of this build.
GoVersion stores the go version that the executable was compiled with.
LogLevel specifies a default log level of info.
RawTags contains the raw set of build tags, separated by commas.
# Structs
LogWriter is a stub type whose behavior can be changed using the build flags "stdlog" and "nolog".
PrefixLog is a pass-through logger that adds a prefix to every logged line.
RotatingLogWriter is a wrapper around the LogWriter that supports log file rotation.
ShutdownLogger wraps an existing logger with a shutdown function which will be called on Critical/Criticalf to prompt shutdown.
# Interfaces
LeveledSubLogger provides the ability to retrieve the subsystem loggers of a logger and set their log levels individually or all at once.
# Type aliases
DeploymentType is an enum specifying the deployment to compile.
LogType is an indicating the type of logging specified by the build flag.
SubLoggers is a type that holds a map of subsystem loggers keyed by their subsystem name.