federer
Version:
Experiments in asynchronous federated learning and decentralized learning
27 lines • 956 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCoordinatorLogger = exports.getLoggerOptions = void 0;
const common_1 = require("../../common");
/**
* Get the logging options for a node type from an
* {@link CoordinatorLoggingOptions} object.
*/
function getLoggerOptions(nodeType, options) {
if (options === undefined) {
return undefined;
}
else if (options.configuration === "common") {
return options.options;
}
else if (options.configuration === "individual") {
return options[nodeType];
}
}
exports.getLoggerOptions = getLoggerOptions;
/** Get the logger for the coordinator */
function getCoordinatorLogger(options) {
const loggerOptions = getLoggerOptions("coordinator", options);
return common_1.createLogger(loggerOptions, "Coordinator", "coordinator.log");
}
exports.getCoordinatorLogger = getCoordinatorLogger;
//# sourceMappingURL=logging.js.map