mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 06:46:17 +00:00
Added separate log file
This commit is contained in:
parent
577ba30913
commit
74bbc4e2c7
1 changed files with 8 additions and 7 deletions
|
@ -67,13 +67,6 @@ func hasLimitIp() bool {
|
|||
for _, client := range clients {
|
||||
limitIp := client.LimitIP
|
||||
if limitIp > 0 {
|
||||
logIpFile, err := os.Create("/var/log/3xipl.log")
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
defer logIpFile.Close()
|
||||
log.SetOutput(logIpFile)
|
||||
log.SetFlags(log.LstdFlags)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -247,6 +240,14 @@ func updateInboundClientIps(inboundClientIps *model.InboundClientIps, clientEmai
|
|||
shouldCleanLog = true
|
||||
|
||||
if limitIp < len(ips) && inbound.Enable {
|
||||
|
||||
logIpFile, err := os.Create("/var/log/3xipl.log")
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
defer logIpFile.Close()
|
||||
log.SetOutput(logIpFile)
|
||||
log.SetFlags(log.LstdFlags)
|
||||
|
||||
disAllowedIps = append(disAllowedIps, ips[limitIp:]...)
|
||||
for i := limitIp; i < len(ips); i++ {
|
||||
|
|
Loading…
Reference in a new issue