Documentation ¶
Index ¶
- Constants
- func BlockMessageLog(nameRule string) (err error, matchCount int)deprecated
- func IsBlockedMessageByID(msgid int) booldeprecated
- func IsMsgLogValid(msgid int) bool
- func RemoveBlockedMessage(nameRule string) (err error, matchCount int)deprecated
- func SetCurrMsgLogMode(mode MsgLogMode)
- func SetMsgLogRule(name string, rule MsgLogRule) error
- func VisitBlockedMessage(callback func(*cellnet.MessageMeta) bool)deprecated
- func VisitMsgLogRule(mode MsgLogMode, callback func(*cellnet.MessageMeta) bool)
- func WriteRecvLogger(log *golog.Logger, protocol string, ses cellnet.Session, msg interface{})
- func WriteSendLogger(log *golog.Logger, protocol string, ses cellnet.Session, msg interface{})
- type MsgLogMode
- type MsgLogRule
- type PacketMessagePeeker
Constants ¶
View Source
const LogColorDefine = `` /* 749-byte string literal not displayed */
使用github.com/bobwong89757/golog的cellnet配色方案
Variables ¶
This section is empty.
Functions ¶
func BlockMessageLog
deprecated
func IsBlockedMessageByID
deprecated
func RemoveBlockedMessage
deprecated
added in
v0.0.3
func SetMsgLogRule ¶ added in v0.0.3
func SetMsgLogRule(name string, rule MsgLogRule) error
指定某个消息的处理规则, 消息格式: packageName.MsgName
func VisitBlockedMessage
deprecated
added in
v0.0.3
func VisitBlockedMessage(callback func(*cellnet.MessageMeta) bool)
Deprecated: 遍历被屏蔽的消息
func VisitMsgLogRule ¶ added in v0.0.3
func VisitMsgLogRule(mode MsgLogMode, callback func(*cellnet.MessageMeta) bool)
遍历消息规则
func WriteRecvLogger ¶
Types ¶
type MsgLogMode ¶ added in v0.0.3
type MsgLogMode int
const ( // 显示所有的消息日志 MsgLogMode_ShowAll MsgLogMode = iota // 禁用所有的消息日志 MsgLogMode_Mute // 黑名单内的不显示 MsgLogMode_BlackList // 只显示白名单的日志 MsgLogMode_WhiteList )
type MsgLogRule ¶ added in v0.0.3
type MsgLogRule int
const ( // 显示所有的消息日志 MsgLogRule_None MsgLogRule = iota // 黑名单内的不显示 MsgLogRule_BlackList // 只显示白名单的日志 MsgLogRule_WhiteList )
Click to show internal directories.
Click to hide internal directories.