package
2.1.0-alpha.20180416+incompatible
Repository: https://github.com/coyle/cockroach.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

DirSet returns true of the log directory has been changed from its default.
DisableTracebacks turns off tracebacks for log.Fatals.
Error logs to the ERROR, WARNING, and INFO logs.
Errorf logs to the ERROR, WARNING, and INFO logs.
ErrorfDepth logs to the ERROR, WARNING, and INFO logs, offsetting the caller's stack frame by 'depth'.
Event looks for an opentracing.Trace in the context and logs the given message to it.
Eventf looks for an opentracing.Trace in the context and formats and logs the given message to it.
Every is a convenience constructor for an EveryN object that allows a log message every n duration.
ExpensiveLogEnabled is used to test whether effort should be used to produce log messages whose construction has a measurable cost.
Fatal logs to the INFO, WARNING, ERROR, and FATAL logs, including a stack trace of all running goroutines, then calls os.Exit(255).
FatalChan is closed when Fatal is called.
Fatalf logs to the INFO, WARNING, ERROR, and FATAL logs, including a stack trace of all running goroutines, then calls os.Exit(255).
FatalfDepth logs to the INFO, WARNING, ERROR, and FATAL logs (offsetting the caller's stack frame by 'depth'), including a stack trace of all running goroutines, then calls os.Exit(255).
FatalOnPanic recovers from a panic and exits the process with a Fatal log.
FetchEntriesFromFiles fetches all available log entries on disk that are between the 'startTimestamp' and 'endTimestamp'.
FinishEventLog closes the event log in the context (see WithEventLog).
Flush flushes all pending log I/O.
GetLogReader returns a reader for the specified filename.
HasSpanOrEvent returns true if the context has a span or event that should be logged to.
Info logs to the INFO log.
Infof logs to the INFO log.
InfofDepth logs to the INFO log, offsetting the caller's stack frame by 'depth'.
Intercept diverts log traffic to the given function `f`.
ListLogFiles returns a slice of FileInfo structs for each log file on the local node, in any of the configured log directories.
LoggingToStderr returns true if log messages of the given severity are visible on stderr.
MakeEntry creates an Entry.
MakeMessage creates a structured log entry.
NewEntryDecoder creates a new instance of EntryDecoder.
NewSecondaryLogger creates a secondary logger.
NewStdLogger creates a *stdLog.Logger that forwards messages to the CockroachDB logs with the specified severity.
RecoverAndReportNonfatalPanic is an alternative RecoverAndReportPanic that does not re-panic in Release builds.
RecoverAndReportPanic can be invoked on goroutines that run with stderr redirected to logs to ensure the user gets informed on the real stderr a panic has occurred.
Redact returns a redacted version of the supplied item that is safe to use in anonymized reporting.
RegisterTagFn adds a function for tagging crash reports based on the context.
ReportablesToSafeError inspects the given format string (taken as not needing redaction) and reportables, redacts them appropriately and returns an error that is safe to pass to anonymized reporting.
ReportOrPanic either reports an error to sentry, if run from a release binary, or panics, if triggered in tests.
ReportPanic reports a panic has occurred on the real stderr.
Safe constructs a SafeType.
Scope creates a TestLogScope which corresponds to the lifetime of a logging directory.
ScopeWithoutShowLogs ignores the -show-logs flag and should be used for tests that require the logs go to files.
SendCrashReport posts to sentry.
SetExitFunc allows setting a function that will be called to exit the process when a Fatal message is generated.
SetSync configures whether logging synchronizes all writes.
SetupCrashReporter sets the crash reporter info.
SetVModule alters the vmodule logging level to the passed in value.
SeverityByName attempts to parse the passed in string into a severity.
Shout logs to the specified severity's log, and also to the real stderr if logging is currently redirected to a file.
StartGCDaemon starts the log file GC -- this must be called after command-line parsing has completed so that no data is lost when the user configures larger max sizes than the defaults.
V returns true if the logging verbosity is set to the specified level or higher.
VDepth reports whether verbosity at the call site is at least the requested level.
VErrEvent either logs an error message to the log files (which also outputs to the active trace or event log) or to the trace/event log alone, depending on whether the specified verbosity level is active.
VErrEventf either logs an error message to the log files (which also outputs to the active trace or event log) or to the trace/event log alone, depending on whether the specified verbosity level is active.
VErrEventfDepth performs the same as VErrEventf but checks the verbosity level at the given depth in the call stack.
VEvent either logs a message to the log files (which also outputs to the active trace or event log) or to the trace/event log alone, depending on whether the specified verbosity level is active.
VEventf either logs a message to the log files (which also outputs to the active trace or event log) or to the trace/event log alone, depending on whether the specified verbosity level is active.
VEventfDepth performs the same as VEventf but checks the verbosity level at the given depth in the call stack.
Warning logs to the WARNING and INFO logs.
Warningf logs to the WARNING and INFO logs.
WarningfDepth logs to the WARNING and INFO logs, offsetting the caller's stack frame by 'depth'.
WithEventLog creates and embeds a trace.EventLog in the context, causing future logging and event calls to go to the EventLog.
WithLogTag returns a context (derived from the given context) which when used with a logging function results in the given name and value being printed in the message.
WithLogTagInt is a variant of WithLogTag that avoids the allocation associated with boxing the value in an interface{}.
WithLogTagInt64 is a variant of WithLogTag that avoids the allocation associated with boxing the value in an interface{}.
WithLogTagStr is a variant of WithLogTag that avoids the allocation associated with boxing the value in an interface{}.
WithNoEventLog creates a context which no longer has an embedded event log.

# Constants

DEFAULT is the end sentinel.
No description provided by the author
No description provided by the author
No description provided by the author
NONE is used to specify when no messages should be printed to the log file or stderr.
No description provided by the author
No description provided by the author

# Variables

CrashReports wraps "diagnostics.reporting.send_crash_reports".
DiagnosticsReportingEnabled wraps "diagnostics.reporting.enabled".
No description provided by the author
No description provided by the author
10MiB.
100MiB.
OrigStderr points to the original stderr stream.
PanicOnAssertions wraps "debug.panic_on_failed_assertions".
ReportSensitiveDetails enables reporting of unanonymized data.
No description provided by the author
No description provided by the author

# Structs

AmbientContext is a helper type used to "annotate" context.Contexts with log tags and a Tracer or EventLog.
DirName overrides (if non-empty) the choice of directory in which to write logs.
Entry
Entry represents a cockroach structured log entry.
EntryDecoder reads successive encoded log entries from the input buffer.
EveryN provides a way to rate limit spammy log messages.
A FileDetails holds all of the particulars that can be parsed by the name of a log file.
No description provided by the author
A SafeType panic can be reported verbatim, i.e.
SecondaryLogger represents a secondary / auxiliary logging channel whose logging events go to a different file than the main logging facility.
TestLogScope represents the lifetime of a logging output.

# Interfaces

SafeMessager is implemented by objects which have a way of representing themselves suitably redacted for anonymized reporting.

# Type aliases

InterceptorFn is the type of function accepted by Intercept().
No description provided by the author