mirror of
https://github.com/alireza0/x-ui.git
synced 2026-10-25 05:02:39 +00:00
bug fix log_writer #872
This commit is contained in:
parent
3c922d8673
commit
1fcf3d68f1
1 changed files with 1 additions and 1 deletions
|
|
@ -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:])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue