forked from embee/woomy
		
	removed fatal level
This commit is contained in:
		
							parent
							
								
									9bd67779ec
								
							
						
					
					
						commit
						abab09546c
					
				
					 4 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -278,7 +278,7 @@ module.exports = client => {
 | 
			
		|||
  // Both of these functions catch errors and log them (maybe we could use sentry?)
 | 
			
		||||
  process.on('uncaughtException', (err) => {
 | 
			
		||||
    const errorMsg = err.stack.replace(new RegExp(`${__dirname}/`, 'g'), './')
 | 
			
		||||
    client.logger.fatal(`Uncaught Exception: ${errorMsg}`)
 | 
			
		||||
    client.logger.error(`Uncaught Exception: ${errorMsg}`)
 | 
			
		||||
    process.exit(1)
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,12 +12,11 @@ const logger = colorConsole({
 | 
			
		|||
      info: `{{timestamp}} | ${'{{title}}'.cyan} | {{file}} | {{message}}`,
 | 
			
		||||
      ready: `{{timestamp}} | ${'{{title}}'.green} | {{file}} | {{message}}`,
 | 
			
		||||
      warn: `{{timestamp}} | ${'{{title}}'.yellow} | {{file}} | {{message}}`,
 | 
			
		||||
      error: `{{timestamp}} | ${'{{title}}'.red} | {{file}} | {{message}}`,
 | 
			
		||||
      fatal: `{{timestamp}} | ${'{{title}}'.red.bold} | {{file}} | {{message}}`
 | 
			
		||||
      error: `{{timestamp}} | ${'{{title}}'.red} | {{file}} | {{message}}`
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  dateformat: 'yyyy-mm-dd"T"HH:MM:ss',
 | 
			
		||||
  methods: ['cmd', 'debug', 'info', 'ready', 'warn', 'error', 'fatal'],
 | 
			
		||||
  methods: ['cmd', 'debug', 'info', 'ready', 'warn', 'error'],
 | 
			
		||||
  filters: [colors.white]
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ module.exports = {
 | 
			
		|||
      mongoose.set('useFindAndModify', false)
 | 
			
		||||
      mongoose.Promise = global.Promise
 | 
			
		||||
    } catch (err) {
 | 
			
		||||
      client.logger.fatal(`Could not connect to the database:\n ${err.stack}`)
 | 
			
		||||
      client.logger.error(`Could not connect to the database:\n ${err.stack}`)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    mongoose.connection.on('connected', () => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue