mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	added "backend log" dialog
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/routes/api/backend_log.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/routes/api/backend_log.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| "use strict"; | ||||
|  | ||||
| const fs = require('fs'); | ||||
| const dateUtils = require('../../services/date_utils'); | ||||
| const {LOG_DIR} = require('../../services/data_dir.js'); | ||||
|  | ||||
| async function getBackendLog() { | ||||
|     const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`; | ||||
|  | ||||
|     return fs.readFileSync(file, 'utf8'); | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|     getBackendLog | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user