mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 03:36:19 +00:00
removed some empty lines
This commit is contained in:
parent
dd46cda8f7
commit
1a677a4b7e
2 changed files with 1 additions and 3 deletions
|
@ -64,7 +64,6 @@ func (j *CheckClientIpJob) clearLogTime() {
|
|||
}
|
||||
|
||||
func (j *CheckClientIpJob) clearAccessLog() {
|
||||
|
||||
accessLogPath := xray.GetAccessLogPath()
|
||||
logAccessP, err := os.OpenFile(xray.GetAccessPersistentLogPath(), os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
||||
j.checkError(err)
|
||||
|
|
|
@ -16,7 +16,7 @@ func NewClearLogsJob() *ClearLogsJob {
|
|||
func (j *ClearLogsJob) Run() {
|
||||
logFiles := []string{xray.GetIPLimitLogPath(), xray.GetIPLimitBannedLogPath(), xray.GetAccessPersistentLogPath()}
|
||||
logFilesPrev := []string{xray.GetIPLimitBannedPrevLogPath(), xray.GetAccessPersistentPrevLogPath()}
|
||||
|
||||
|
||||
// clear old previous logs
|
||||
for i := 0; i < len(logFilesPrev); i++ {
|
||||
if err := os.Truncate(logFilesPrev[i], 0); err != nil {
|
||||
|
@ -26,7 +26,6 @@ func (j *ClearLogsJob) Run() {
|
|||
|
||||
// clear log files and copy to previous logs
|
||||
for i := 0; i < len(logFiles); i++ {
|
||||
|
||||
if i > 0 {
|
||||
// copy to previous logs
|
||||
logFilePrev, err := os.OpenFile(logFilesPrev[i-1], os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
||||
|
|
Loading…
Reference in a new issue