mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 11:46:18 +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() {
|
func (j *CheckClientIpJob) clearAccessLog() {
|
||||||
|
|
||||||
accessLogPath := xray.GetAccessLogPath()
|
accessLogPath := xray.GetAccessLogPath()
|
||||||
logAccessP, err := os.OpenFile(xray.GetAccessPersistentLogPath(), os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
logAccessP, err := os.OpenFile(xray.GetAccessPersistentLogPath(), os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
||||||
j.checkError(err)
|
j.checkError(err)
|
||||||
|
|
|
@ -16,7 +16,7 @@ func NewClearLogsJob() *ClearLogsJob {
|
||||||
func (j *ClearLogsJob) Run() {
|
func (j *ClearLogsJob) Run() {
|
||||||
logFiles := []string{xray.GetIPLimitLogPath(), xray.GetIPLimitBannedLogPath(), xray.GetAccessPersistentLogPath()}
|
logFiles := []string{xray.GetIPLimitLogPath(), xray.GetIPLimitBannedLogPath(), xray.GetAccessPersistentLogPath()}
|
||||||
logFilesPrev := []string{xray.GetIPLimitBannedPrevLogPath(), xray.GetAccessPersistentPrevLogPath()}
|
logFilesPrev := []string{xray.GetIPLimitBannedPrevLogPath(), xray.GetAccessPersistentPrevLogPath()}
|
||||||
|
|
||||||
// clear old previous logs
|
// clear old previous logs
|
||||||
for i := 0; i < len(logFilesPrev); i++ {
|
for i := 0; i < len(logFilesPrev); i++ {
|
||||||
if err := os.Truncate(logFilesPrev[i], 0); err != nil {
|
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
|
// clear log files and copy to previous logs
|
||||||
for i := 0; i < len(logFiles); i++ {
|
for i := 0; i < len(logFiles); i++ {
|
||||||
|
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
// copy to previous logs
|
// copy to previous logs
|
||||||
logFilePrev, err := os.OpenFile(logFilesPrev[i-1], os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
logFilePrev, err := os.OpenFile(logFilesPrev[i-1], os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
||||||
|
|
Loading…
Reference in a new issue