Documentation
¶
Overview ¶
Package hermes provides a few things that we may need
Index ¶
Constants ¶
View Source
const ( PermAdmin = "Administrate" PrincipalAdmin = "perm:Administrate" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
// Log a notice statement
Noticef(format string, v ...interface{})
// Log a fatal error
Fatalf(format string, v ...interface{})
// Log an error
Errorf(format string, v ...interface{})
// Log a debug statement
Debugf(format string, v ...interface{})
// Log a trace statement
Tracef(format string, v ...interface{})
}
Logger is the interface of hermes loggers
func GetLogger ¶
func GetLogger(opts *LoggerOptions) Logger
GetLogger is a convenience function that returns a logger configured according to your options and ready to be used in your server
type LoggerOptions ¶
type LoggerOptions struct {
LogFile string
RemoteSyslog string
Syslog bool
Logtime bool
Debug bool
Trace bool
}
LoggerOptions is the struct you need to pass to the GetLogger function it can be just created and passed untouched to the GetLogger if you need some quick logging functionality. it is recommended to at least set the Debug and Trace flags according to your taste though
Directories
¶
| Path | Synopsis |
|---|---|
|
Package logger provides logging facilities for the NATS server
|
Package logger provides logging facilities for the NATS server |
|
Package tools provides utilities like the logger to all parts of the project
|
Package tools provides utilities like the logger to all parts of the project |
Click to show internal directories.
Click to hide internal directories.