Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Buffalo ¶
Buffalo returns a more sane logging format than the default buffalo formatter. For the most part, we only care about the path, the method, and the status code. It's also good to note that internal logs from buffalo should only be allowed in development as our logging-system should be handled from our codebase. If the environment is production, then its a noop logger.
Types ¶
type Entry ¶
type Entry interface {
// Basic Logging Operation
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Errorf(format string, args ...interface{})
// Attach contextual information to the logging entry
WithFields(fields map[string]interface{}) 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.
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 (*Logger) WithFields ¶
WithFields Entry implementation.