Documentation ¶
Index ¶
- type Logger
- func (l *Logger) EnableLog(enable bool)
- func (l *Logger) IsEnabled() bool
- func (l *Logger) LogEnforce(matcher string, request []interface{}, result bool, explains [][]string)
- func (l *Logger) LogError(err error, msg ...string)
- func (l *Logger) LogModel(model [][]string)
- func (l *Logger) LogPolicy(policy map[string][][]string)
- func (l *Logger) LogRole(roles []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the implementation for a Logger using zap.
func NewLogger ¶
NewLogger is the default constructor for Logger. Params : enabled, jsonEncode enabled initialize recording state, jsonEncode initialize log whether structured as json.
func NewLoggerByZap ¶
NewLoggerByZap creates zap-logger by an existing zap instance.
func (*Logger) LogEnforce ¶
Click to show internal directories.
Click to hide internal directories.