change runtimechecklog
This commit is contained in:
		
							parent
							
								
									fcc369d610
								
							
						
					
					
						commit
						3408baa60e
					
				| 
						 | 
				
			
			@ -18,7 +18,7 @@ export function runtimeCheckLogs(folderPath) {
 | 
			
		|||
 | 
			
		||||
      fileList.map((file) => {
 | 
			
		||||
        const filePath = `${folderPath}/${file}`;
 | 
			
		||||
        if (file.search("log.") === -1) {
 | 
			
		||||
        if (file?.split(".")[filePath.split(".").length - 1]) {
 | 
			
		||||
          const stats = fs.statSync(filePath);
 | 
			
		||||
 | 
			
		||||
          //scan file today
 | 
			
		||||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ export function runtimeCheckLogs(folderPath) {
 | 
			
		|||
    folderWatcher.on("add", async (filePath) => {
 | 
			
		||||
      //import log new file
 | 
			
		||||
      console.log(`New file added: ${filePath}`);
 | 
			
		||||
      if (filePath.search("log.") === -1) {
 | 
			
		||||
      if (filePath?.split(".")[filePath.split(".").length - 1]) {
 | 
			
		||||
        await LogDetectFile.firstOrCreate(
 | 
			
		||||
          { file_name: filePath.split("/")[filePath.split("/").length - 1] },
 | 
			
		||||
          { file_name: filePath.split("/")[filePath.split("/").length - 1] }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue