use logx
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15m24s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15m24s
This commit is contained in:
@ -26,3 +26,14 @@ CategoryRpc:
|
||||
Key: category.rpc
|
||||
|
||||
BucketName: gallery
|
||||
|
||||
Log:
|
||||
ServiceName: gallery-rpc-service
|
||||
Mode: console # 日志输出模式,支持 console 和 file
|
||||
Encoding: plain # 日志格式,支持 json 和 plain
|
||||
Path: ./logs
|
||||
Level: debug # 日志等级,支持 debug,info,error,severe
|
||||
MaxSize: 10 # MB
|
||||
KeepDays: 30 # 天
|
||||
MaxBackups: 3
|
||||
Compress: false
|
||||
|
||||
@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"godemo/gallery/gallery"
|
||||
"godemo/gallery/internal/config"
|
||||
@ -10,6 +9,7 @@ import (
|
||||
"godemo/gallery/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/core/service"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
@ -34,6 +34,6 @@ func main() {
|
||||
})
|
||||
defer s.Stop()
|
||||
|
||||
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
|
||||
logx.Infof("Starting rpc server at %s...", c.ListenOn)
|
||||
s.Start()
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package config
|
||||
|
||||
import "github.com/zeromicro/go-zero/zrpc"
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
|
||||
Reference in New Issue
Block a user