File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,16 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
41
41
if len (matches ) > 3 {
42
42
level := matches [2 ]
43
43
msgBody := matches [3 ]
44
+ msgBodyLower := strings .ToLower (msgBody )
44
45
45
- if strings .Contains (strings .ToLower (msgBody ), "failed" ) {
46
+ if strings .Contains (msgBodyLower , "tls handshake error" ) ||
47
+ strings .Contains (msgBodyLower , "connection ends" ) {
48
+ logger .Debug ("XRAY: " + msgBody )
49
+ lw .lastLine = ""
50
+ continue
51
+ }
52
+
53
+ if strings .Contains (msgBodyLower , "failed" ) {
46
54
logger .Error ("XRAY: " + msgBody )
47
55
} else {
48
56
switch level {
@@ -60,7 +68,16 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
60
68
}
61
69
lw .lastLine = ""
62
70
} else if msg != "" {
63
- if strings .Contains (strings .ToLower (msg ), "failed" ) {
71
+ msgLower := strings .ToLower (msg )
72
+
73
+ if strings .Contains (msgLower , "tls handshake error" ) ||
74
+ strings .Contains (msgLower , "connection ends" ) {
75
+ logger .Debug ("XRAY: " + msg )
76
+ lw .lastLine = msg
77
+ continue
78
+ }
79
+
80
+ if strings .Contains (msgLower , "failed" ) {
64
81
logger .Error ("XRAY: " + msg )
65
82
} else {
66
83
logger .Debug ("XRAY: " + msg )
You can’t perform that action at this time.
0 commit comments