-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added option for custom Log Directory #240
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this breaks reading logs on Windows server. Linux uses this application's log output handler but Windows outputs to the default game logs folder.
arma-server-web-admin/lib/logs.js
Lines 58 to 77 in 47d30d4
if (this.config.type === 'linux') { | |
return path.join(this.config.path, 'logs') | |
} | |
var gameLogFolder = gamesLogFolder[this.config.game] | |
if (!gameLogFolder) { | |
return null | |
} | |
if (this.config.type === 'windows') { | |
return userhome('AppData', 'Local', gameLogFolder) | |
} | |
if (this.config.type === 'wine') { | |
var username = process.env.USER | |
return userhome('.wine', 'drive_c', 'users', username, 'Local Settings', 'Application Data', gameLogFolder) | |
} | |
return null |
Can you double check that logs works on Windows?
Huh, odd. I admit that we didn't properly test the actual writing of logs, mainly because our first rough fix (see below) worked just fine on our windows server and the latest also properly returned the custom logs path to the frontend's Settings panel. Logs.prototype.logsPath = function () {
return "custom log path"; Thanks for the feedback, we'll see towards making it work. |
Co-Authored-By: Elia Frate <[email protected]>
Turns out I misunderstood and miscommunicated what exactly the implementation was intended to do. On Windows, As such, the current implementation already works for the intended purpose on windows. So if the user uses a custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late reply, looks mostly good now!
No problem, thanks for the review! |
Co-authored-by: Björn Dahlgren <[email protected]>
Hi, our community noticed the lack of a custom logs directory option, so we added it. First with a dirty override of
Logs.prototype.logsPath()
and now a slightly cleaner implementation 😄