mirror of
				https://github.com/hydralauncher/hydra.git
				synced 2025-03-09 15:40:26 +00:00 
			
		
		
		
	Merge pull request #521 from hydralauncher/feat/change-logs-path
Change logs path to match hydra.db
This commit is contained in:
		
						commit
						016f47d17f
					
				
					 3 changed files with 3 additions and 6 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -9,4 +9,3 @@ out
 | 
			
		|||
*.log*
 | 
			
		||||
.env
 | 
			
		||||
.vite
 | 
			
		||||
logs
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,6 +26,8 @@ export const databasePath = path.join(
 | 
			
		|||
  "hydra.db"
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
export const logsPath = path.join(app.getPath("appData"), "hydra", "logs");
 | 
			
		||||
 | 
			
		||||
export const seedsPath = app.isPackaged
 | 
			
		||||
  ? path.join(process.resourcesPath, "seeds")
 | 
			
		||||
  : path.join(__dirname, "..", "..", "seeds");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +1,7 @@
 | 
			
		|||
import { app } from "electron";
 | 
			
		||||
import { logsPath } from "@main/constants";
 | 
			
		||||
import log from "electron-log";
 | 
			
		||||
import path from "path";
 | 
			
		||||
 | 
			
		||||
const logsPath = app.isPackaged
 | 
			
		||||
  ? path.join(app.getAppPath(), "..", "..", "logs")
 | 
			
		||||
  : path.join(app.getAppPath(), "logs");
 | 
			
		||||
 | 
			
		||||
log.transports.file.resolvePathFn = (
 | 
			
		||||
  _: log.PathVariables,
 | 
			
		||||
  message?: log.LogMessage | undefined
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue