mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
bug fix log_writer #872
This commit is contained in:
@@ -31,7 +31,7 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
|
||||
// Find level in []
|
||||
startIndex := strings.Index(messageBody, "[")
|
||||
endIndex := strings.Index(messageBody, "]")
|
||||
if startIndex != -1 && endIndex != -1 {
|
||||
if startIndex != -1 && endIndex != -1 && startIndex < endIndex {
|
||||
level := strings.TrimSpace(messageBody[startIndex+1 : endIndex])
|
||||
msgBody := "XRAY: " + strings.TrimSpace(messageBody[endIndex+1:])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user