Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GLogger *logrus.Entry
View Source
var Logrus *logrus.Logger = logrus.New()
Functions ¶
func NewWSLogHook ¶
func NewWSLogHook(ss string) wsLogHook
func StartGLogger ¶
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
* * 日志记录器,未来会移除这个slot *
func NewLogWriter ¶
type RealTimeLogger ¶
type RealTimeLogger struct { WsServer websocket.Upgrader Clients map[string]*websocket.Conn // contains filtered or unexported fields }
* * 这是用来给外部输出日志的websocket服务器,其功能非常简单,就是单纯的对外输出实时日志,方便调试使用。 * 注意:该功能需要配合HttpApiServer使用, 客户端连上以后必须在5s内发送一个 ‘WsTerminal’ 的固定字符 * 串到服务器才能过认证。 *
func StartNewRealTimeLogger ¶
func StartNewRealTimeLogger(s string) *RealTimeLogger
Click to show internal directories.
Click to hide internal directories.