mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Enhance log message
This commit is contained in:
		
							parent
							
								
									4bdef3720c
								
							
						
					
					
						commit
						ab3f8fd10c
					
				
					 1 changed files with 5 additions and 6 deletions
				
			
		
							
								
								
									
										11
									
								
								src/index.ts
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								src/index.ts
									
										
									
									
									
								
							| 
						 | 
					@ -48,7 +48,7 @@ main();
 | 
				
			||||||
 * Init process
 | 
					 * Init process
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
function main() {
 | 
					function main() {
 | 
				
			||||||
	process.title = `Misskey (${ cluster.isMaster ? 'master' : 'worker' })`;
 | 
						process.title = `Misskey (${cluster.isMaster ? 'master' : 'worker'})`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cluster.isMaster || program.disableClustering) {
 | 
						if (cluster.isMaster || program.disableClustering) {
 | 
				
			||||||
		masterMain();
 | 
							masterMain();
 | 
				
			||||||
| 
						 | 
					@ -154,11 +154,10 @@ async function init(): Promise<Config> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function checkMongoDb(config: Config) {
 | 
					function checkMongoDb(config: Config) {
 | 
				
			||||||
	const mongoDBLogger = new Logger('MongoDB');
 | 
						const mongoDBLogger = new Logger('MongoDB');
 | 
				
			||||||
	mongoDBLogger.info(`Host: ${config.mongodb.host}`);
 | 
						const u = config.mongodb.user ? encodeURIComponent(config.mongodb.user) : null;
 | 
				
			||||||
	mongoDBLogger.info(`Port: ${config.mongodb.port}`);
 | 
						const p = config.mongodb.pass ? encodeURIComponent(config.mongodb.pass) : null;
 | 
				
			||||||
	mongoDBLogger.info(`DB: ${config.mongodb.db}`);
 | 
						const uri = `mongodb://${u && p ? `${u}:****@` : ''}${config.mongodb.host}:${config.mongodb.port}/${config.mongodb.db}`;
 | 
				
			||||||
	if (config.mongodb.user) mongoDBLogger.info(`User: ${config.mongodb.user}`);
 | 
						mongoDBLogger.info(`Connecting to ${uri}`);
 | 
				
			||||||
	if (config.mongodb.pass) mongoDBLogger.info(`Pass: ****`);
 | 
					 | 
				
			||||||
	require('./db/mongodb');
 | 
						require('./db/mongodb');
 | 
				
			||||||
	mongoDBLogger.succ('Connectivity confirmed');
 | 
						mongoDBLogger.succ('Connectivity confirmed');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue