proper pathing for config file logging
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
82961ac36f
commit
323271067f
|
|
@ -12,6 +12,7 @@ const fs = require("fs");
|
||||||
const { grpc } = require("../src/utils/grpc");
|
const { grpc } = require("../src/utils/grpc");
|
||||||
const { stringify, stripWindowsDriveLetter } = require("../src/utils/general");
|
const { stringify, stripWindowsDriveLetter } = require("../src/utils/general");
|
||||||
|
|
||||||
|
let driverConfigFile;
|
||||||
let options;
|
let options;
|
||||||
const args = require("yargs")
|
const args = require("yargs")
|
||||||
.env("DEMOCRATIC_CSI")
|
.env("DEMOCRATIC_CSI")
|
||||||
|
|
@ -32,11 +33,13 @@ const args = require("yargs")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
options = JSON.parse(fs.readFileSync(path, "utf-8"));
|
options = JSON.parse(fs.readFileSync(path, "utf-8"));
|
||||||
|
driverConfigFile = fs.realpathSync(path);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
options = yaml.load(fs.readFileSync(path, "utf8"));
|
options = yaml.load(fs.readFileSync(path, "utf8"));
|
||||||
|
driverConfigFile = fs.realpathSync(path);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
|
|
@ -384,7 +387,7 @@ logger.info(
|
||||||
"starting csi server - node version: %s, package version: %s, config file: %s, csi-name: %s, csi-driver: %s, csi-mode: %s, csi-version: %s, address: %s, socket: %s",
|
"starting csi server - node version: %s, package version: %s, config file: %s, csi-name: %s, csi-driver: %s, csi-mode: %s, csi-version: %s, address: %s, socket: %s",
|
||||||
process.version,
|
process.version,
|
||||||
args.version,
|
args.version,
|
||||||
fs.realpathSync(args.driverConfigFile),
|
driverConfigFile,
|
||||||
args.csiName,
|
args.csiName,
|
||||||
options.driver,
|
options.driver,
|
||||||
args.csiMode.join(","),
|
args.csiMode.join(","),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue