mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 03:26:57 +08:00
fix cron
This commit is contained in:
parent
bebe89162f
commit
c624880863
@ -20,8 +20,12 @@ func NewRootCmd() (rootCmd *RootCmd) {
|
|||||||
Short: "Start the server",
|
Short: "Start the server",
|
||||||
Long: `Start the server`,
|
Long: `Start the server`,
|
||||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
err := rootCmd.getConfFromCmdAndInit(cmd)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
log.InitFromConfig("newlog")
|
log.InitFromConfig("newlog")
|
||||||
return rootCmd.getConfFromCmdAndInit(cmd)
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
rootCmd.Command = c
|
rootCmd.Command = c
|
||||||
|
@ -95,7 +95,7 @@ func NewZapLogger() (*ZapLogger, error) {
|
|||||||
Encoding: "json",
|
Encoding: "json",
|
||||||
EncoderConfig: zap.NewProductionEncoderConfig(),
|
EncoderConfig: zap.NewProductionEncoderConfig(),
|
||||||
OutputPaths: []string{config.Config.Log.StorageLocation},
|
OutputPaths: []string{config.Config.Log.StorageLocation},
|
||||||
ErrorOutputPaths: []string{"stderr"},
|
ErrorOutputPaths: []string{config.Config.Log.StorageLocation},
|
||||||
}
|
}
|
||||||
l, err := zapConfig.Build()
|
l, err := zapConfig.Build()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user