package
1.1.3
Repository: https://github.com/jcoene/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.
ErrEvent looks for an opentracing.Trace in the context and logs the given message to it.
ErrEventf looks for an opentracing.Trace in the context and formats and logs the given message to it.
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.
Fatal logs to the INFO, WARNING, ERROR, and FATAL logs, including a stack trace of all running goroutines, then calls os.Exit(255).
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.
NewStdLogger creates a *stdLog.Logger that forwards messages to the CockroachDB logs with the specified severity.
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.
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.
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.
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.
Entry
Entry represents a cockroach structured log entry.
EntryDecoder reads successive encoded log entries from the input buffer.
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.
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