func main() { lconf.LogLevel = conf.Server.LogLevel lconf.LogPath = conf.Server.LogPath leaf.Run( game.Module, gate.Module, login.Module, ) }
func main() { lconf.LogLevel = conf.Server.LogLevel //设置日志级别 lconf为leaf框架conf包的别名 lconf.LogPath = conf.Server.LogPath //设置日志路径 leaf.Run( //游戏服务器启动,进行模块的注册 game.Module, gate.Module, login.Module, ) }
func main() { lconf.LogLevel = conf.Server.LogLevel lconf.LogPath = conf.Server.LogPath leaf.Run( new(game.Module), new(gate.Module), new(login.Module), ) }
func main() { lconf.LogLevel = conf.Server.LogLevel lconf.LogPath = conf.Server.LogPath lconf.ConsolePort = conf.Server.ConsolePort //开启控制台 leaf.Run( game.Module, gate.Module, login.Module, ) }
func main() { lconf.LogLevel = conf.Server.LogLevel lconf.LogPath = conf.Server.LogPath logger.GetLogger().Infof("prepare Run:") leaf.Run( game.Module, gate.Module, login.Module, ) logger.GetLogger().Infof("prepare Exit") }