add logger to all packages
This commit is contained in:
		
							
								
								
									
										5
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.go
									
									
									
									
									
								
							@@ -4,13 +4,18 @@ import (
 | 
				
			|||||||
	"flag"
 | 
						"flag"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"go.balki.me/tss/app"
 | 
						"go.balki.me/tss/app"
 | 
				
			||||||
 | 
						"go.balki.me/tss/db"
 | 
				
			||||||
	"go.balki.me/tss/log"
 | 
						"go.balki.me/tss/log"
 | 
				
			||||||
	"go.balki.me/tss/schedule"
 | 
						"go.balki.me/tss/schedule"
 | 
				
			||||||
 | 
						"go.balki.me/tss/telegram"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
	logger := log.GetZapLogger()
 | 
						logger := log.GetZapLogger()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						db.SetLogger(logger.WithName("db"))
 | 
				
			||||||
	schedule.SetLogger(logger.WithName("schedule"))
 | 
						schedule.SetLogger(logger.WithName("schedule"))
 | 
				
			||||||
 | 
						telegram.SetLogger(logger.WithName("telegram"))
 | 
				
			||||||
	app.SetLogger(logger.WithName("app"))
 | 
						app.SetLogger(logger.WithName("app"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var configPath string
 | 
						var configPath string
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user