File tree Expand file tree Collapse file tree
GameFrameX.DataBase.Mongo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,13 +68,17 @@ public async Task<bool> Open(DbOptions dbOptions)
6868 await DB . InitAsync ( dbOptions . Name , settings ) ;
6969 _mongoDbContext = new MongoDbContext ( ) ;
7070 CurrentDatabase = DB . Database ( dbOptions . Name ) ;
71- LogHelper . Info ( $ "初始化MongoDB服务完成 Url:{ dbOptions . ConnectionString } DbName:{ dbOptions . Name } ") ;
71+ LogHelper . Info ( $ "The MongoDB service is initialized successfully, Url:{ dbOptions . ConnectionString } DbName:{ dbOptions . Name } ") ;
7272 return true ;
7373 }
7474 catch ( Exception exception )
7575 {
7676 LogHelper . Fatal ( exception ) ;
77- LogHelper . Error ( $ "初始化MongoDB服务失败 Url:{ dbOptions . ConnectionString } DbName:{ dbOptions . Name } ") ;
77+ string message = $ "MongoDB service initialization failed, Url:{ dbOptions . ConnectionString } DbName:{ dbOptions . Name } ";
78+ Console . ForegroundColor = ConsoleColor . Red ;
79+ Console . WriteLine ( message ) ;
80+ Console . ResetColor ( ) ;
81+ LogHelper . Error ( message ) ;
7882 return false ;
7983 }
8084 }
You can’t perform that action at this time.
0 commit comments