Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry interface { // Basic Logging Operation Debugf(format string, args ...any) Infof(format string, args ...any) Warnf(format string, args ...any) Errorf(format string, args ...any) // Attach contextual information to the logging entry WithFields(fields map[string]any) Entry // SystemErr is a method that disects the error // and logs the appropriate level and fields for it. SystemErr(err error) }
Entry is an abstraction to the Logger and the logrus.Entry so that *Logger always creates an Entry copy which ensures no Fields are being overwritten.
func EntryFromContext ¶ added in v0.2.0
EntryFromContext returns an Entry that has been stored in the request context. If there is no value for the key or the type assertion fails, it returns a new entry from the provided logger.
type Logger ¶
Logger is the main struct that any athens internal service should use to communicate things.
func New ¶
New constructs a new logger based on the environment and the cloud platform it is running on. TODO: take cloud arg and env to construct the correct JSON formatter.
func NoOpLogger ¶ added in v0.2.0
func NoOpLogger() *Logger
NoOpLogger provides a Logger that does nothing.
Click to show internal directories.
Click to hide internal directories.