// RedirectGrpclog will redirect grpclog to lion. func RedirectGrpclog() { lion.AddGlobalHook( func(l lion.Logger) { grpclog.SetLogger(NewLogger(l)) }, ) }
// Register registers the default lion Logger as the dlog Logger. func Register() { lion.AddGlobalHook( func(lionLogger lion.Logger) { dlog.SetLogger(NewLogger(lionLogger)) }, ) }
func init() { if err := lion.RegisterEncoderDecoder(Encoding, newEncoderDecoder()); err != nil { panic(err.Error()) } lion.SetJSONMarshalFunc(DefaultJSONMarshalFunc) lion.AddGlobalHook(setGlobalLogger) }
func init() { if err := lion.RegisterEncoderDecoder( Encoding, newEncoderDecoder( Encoding, thrift.NewTBinaryProtocolFactory( true, true, ), ), ); err != nil { panic(err.Error()) } lion.AddGlobalHook(setGlobalLogger) }