mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 16:24:03 +03:00
Fix logging
This commit is contained in:
@@ -125,22 +125,22 @@ func (m *MTProtoAbridged) Write(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func (m *MTProtoAbridged) LogDebug(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "abridged"})
|
||||
data = append(data, []interface{}{"type", "abridged"}...)
|
||||
m.conn.LogDebug(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoAbridged) LogInfo(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "abridged"})
|
||||
data = append(data, []interface{}{"type", "abridged"}...)
|
||||
m.conn.LogInfo(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoAbridged) LogWarn(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "abridged"})
|
||||
data = append(data, []interface{}{"type", "abridged"}...)
|
||||
m.conn.LogWarn(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoAbridged) LogError(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "abridged"})
|
||||
data = append(data, []interface{}{"type", "abridged"}...)
|
||||
m.conn.LogError(msg, data...)
|
||||
}
|
||||
|
||||
|
||||
@@ -115,18 +115,22 @@ func (m *MTProtoFrame) Write(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func (m *MTProtoFrame) LogDebug(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "frame"}...)
|
||||
m.conn.LogDebug(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoFrame) LogInfo(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "frame"}...)
|
||||
m.conn.LogInfo(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoFrame) LogWarn(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "frame"}...)
|
||||
m.conn.LogWarn(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoFrame) LogError(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "frame"}...)
|
||||
m.conn.LogError(msg, data...)
|
||||
}
|
||||
|
||||
|
||||
@@ -80,22 +80,22 @@ func (m *MTProtoIntermediate) Write(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func (m *MTProtoIntermediate) LogDebug(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "intermediate"})
|
||||
data = append(data, []interface{}{"type", "intermediate"}...)
|
||||
m.conn.LogDebug(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoIntermediate) LogInfo(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "intermediate"})
|
||||
data = append(data, []interface{}{"type", "intermediate"}...)
|
||||
m.conn.LogInfo(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoIntermediate) LogWarn(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "intermediate"})
|
||||
data = append(data, []interface{}{"type", "intermediate"}...)
|
||||
m.conn.LogWarn(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoIntermediate) LogError(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "intermediate"})
|
||||
data = append(data, []interface{}{"type", "intermediate"}...)
|
||||
m.conn.LogError(msg, data...)
|
||||
}
|
||||
|
||||
|
||||
@@ -98,22 +98,22 @@ func (m *MTProtoProxy) Write(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func (m *MTProtoProxy) LogDebug(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "proxy"})
|
||||
data = append(data, []interface{}{"type", "proxy"}...)
|
||||
m.conn.LogDebug(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoProxy) LogInfo(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "proxy"})
|
||||
data = append(data, []interface{}{"type", "proxy"}...)
|
||||
m.conn.LogInfo(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoProxy) LogWarn(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "proxy"})
|
||||
data = append(data, []interface{}{"type", "proxy"}...)
|
||||
m.conn.LogWarn(msg, data...)
|
||||
}
|
||||
|
||||
func (m *MTProtoProxy) LogError(msg string, data ...interface{}) {
|
||||
data = append(data, []interface{}{"type", "proxy"})
|
||||
data = append(data, []interface{}{"type", "proxy"}...)
|
||||
m.conn.LogError(msg, data...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user