mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:45:25 +01:00 
			
		
		
		
	Fix wrong serve command log location and commit repo action
This commit is contained in:
		
							parent
							
								
									197c4d4a5b
								
							
						
					
					
						commit
						9aba29dd8f
					
				
							
								
								
									
										6
									
								
								serve.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								serve.go
									
									
									
									
									
								
							| @ -11,6 +11,7 @@ import ( | ||||
| 	"io" | ||||
| 	"os" | ||||
| 	"os/exec" | ||||
| 	"path" | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
| 	"time" | ||||
| @ -47,8 +48,9 @@ gogs serv provide access auth for repositories`, | ||||
| 
 | ||||
| func newLogger(execDir string) { | ||||
| 	level := "0" | ||||
| 	os.MkdirAll("log", os.ModePerm) | ||||
| 	log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, execDir+"/log/serv.log")) | ||||
| 	logPath := execDir + "/log/serv.log" | ||||
| 	os.MkdirAll(path.Dir(logPath), os.ModePerm) | ||||
| 	log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, logPath)) | ||||
| 	log.Trace("start logging...") | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user