Documentation ¶
Index ¶
- type Logger
- func (l *Logger) EnableLog(enable bool)
- func (l *Logger) IsEnabled() bool
- func (l *Logger) LogEnforce(event int, line string, request *[]interface{}, policies *[]string, ...)
- func (l *Logger) LogModel(event int, line []string, model [][]string)
- func (l *Logger) LogPolicy(event int, line string, pPolicyFormat []string, gPolicyFormat []string, ...)
- func (l *Logger) LogRole(event int, line string, role []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.