Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
fix: Steam logger directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhid6 committed Nov 30, 2022
1 parent ce92569 commit 55f896f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/server_steamcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,24 @@ const iLogger = Mrhid6Utils.Logger;

const Logger = require("simple-node-logger");

switch (platform) {
case "win32":
userDataPath = path.resolve(
"C:\\ProgramData\\SatisfactoryServerManager"
);
break;
case "linux":
case "darwin":
userDataPath = path.resolve(
path.join(require("os").homedir(), ".SatisfactoryServerManager")
);
break;
}

class SteamCMDLogger extends iLogger {
constructor() {
super({
logBaseDirectory: path.join(userDataPath, "logs"),
logName: "SSMSteamCMD",
});
}
Expand Down

0 comments on commit 55f896f

Please sign in to comment.