add formatting to console logs
This commit is contained in:
		
							parent
							
								
									f930dbea0c
								
							
						
					
					
						commit
						c8fe102fa6
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		|  | @ -30,8 +30,13 @@ export default class logging { | ||||||
| 
 | 
 | ||||||
| 		(PRIORITY) ? this.clear() : false; | 		(PRIORITY) ? this.clear() : false; | ||||||
| 
 | 
 | ||||||
| 		// Display the message.
 | 		// Display the message. 
 | ||||||
| 		console.log((MESSAGE ? (this.title).concat(`\n`) : ``).concat(this.message)); | 		if (MESSAGE) { | ||||||
|  | 			console.log('%c%s%c\n%s', 'font-weight: bold;', this.title, ``, this.message); | ||||||
|  | 		} else { | ||||||
|  | 			console.log(this.message); | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		try { | 		try { | ||||||
| 			M.toast({ text: (MESSAGE ? (this.title).concat(`\n`) : ``).concat(this.message) }); | 			M.toast({ text: (MESSAGE ? (this.title).concat(`\n`) : ``).concat(this.message) }); | ||||||
| 		} catch (err) {} | 		} catch (err) {} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue