로거 되돌림

This commit is contained in:
2023-06-14 00:13:51 +09:00
parent 20b2df1fc5
commit 3add5d9355
10 changed files with 60 additions and 87 deletions

View File

@ -6,6 +6,7 @@ import (
"net"
"os"
"repositories.action2quare.com/ayo/gocommon/logger"
"repositories.action2quare.com/ayo/houston/shared"
"repositories.action2quare.com/ayo/houston/shared/protos"
@ -109,7 +110,7 @@ type Operation interface {
func loadServerConfig() serverConfig {
configFile, err := os.Open("config.json")
if err != nil {
shared.Logger().Println(err)
logger.Println(err)
return serverConfig{
GrpcPort: 8080,
}
@ -125,14 +126,14 @@ func loadServerConfig() serverConfig {
dec := json.NewDecoder(configFile)
err = dec.Decode(&config)
if err != nil {
shared.Logger().Println(err)
logger.Println(err)
return serverConfig{
GrpcPort: 8080,
}
}
if config.Houston == nil {
shared.Logger().Println(`"houston" object is missing in config.json`)
logger.Println(`"houston" object is missing in config.json`)
return serverConfig{
GrpcPort: 8080,
}
@ -166,7 +167,7 @@ type houstonServer struct {
}
func (hs *houstonServer) Start() error {
shared.Logger().Println("houston server is started at port", hs.port)
logger.Println("houston server is started at port", hs.port)
lis, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%d", hs.port))
if err != nil {
return err