arma-server-web-admin icon indicating copy to clipboard operation
arma-server-web-admin copied to clipboard

Added option for custom Log Directory

Open mrschick opened this issue 1 year ago • 3 comments

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 😄

mrschick avatar Mar 16 '23 19:03 mrschick

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.

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.

mrschick avatar Mar 17 '23 12:03 mrschick

Turns out I misunderstood and miscommunicated what exactly the implementation was intended to do.

On Windows, Logs.prototype.logsPath() only determines the path where logs are read by the WebAdmin's Logs tab, not where Arma actually writes them, which is defined by the -profiles startup parameter (set in the respective server preset).

As such, the current implementation already works for the intended purpose on windows. So if the user uses a custom -profiles path for profiles and logs, they can set the logsPath accordingly to view the correct logs output directory via the Logs tab. I rewrote the descriptions accordingly.

mrschick avatar Mar 23 '23 14:03 mrschick

No problem, thanks for the review!

mrschick avatar Jul 26 '23 09:07 mrschick