#2 implement debugger
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { DebugBuilder } from "../../modules/debugger.mjs";
|
||||
const log = new DebugBuilder("client", "op25ConfigGenerator");
|
||||
import { promises as fs } from 'fs';
|
||||
|
||||
class OP25ConfigObject {
|
||||
@@ -7,9 +9,9 @@ class OP25ConfigObject {
|
||||
try {
|
||||
const jsonConfig = JSON.stringify(this, null, 2);
|
||||
await fs.writeFile(filename, jsonConfig);
|
||||
console.log(`Config exported to ${filename}`);
|
||||
log.INFO(`Config exported to ${filename}`);
|
||||
} catch (error) {
|
||||
console.error(`Error exporting config to ${filename}: ${error}`);
|
||||
log.ERROR(`Error exporting config to ${filename}: ${error}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +19,7 @@ class OP25ConfigObject {
|
||||
export class P25ConfigGenerator extends OP25ConfigObject {
|
||||
constructor({ systemName, controlChannels, tagsFile, whitelistFile = undefined }) {
|
||||
super();
|
||||
console.log("Generating P25 Config for:", systemName);
|
||||
log.INFO("Generating P25 Config for:", systemName);
|
||||
const controlChannelsString = controlChannels.join(',');
|
||||
this.channels = [new channelConfig({
|
||||
"channelName": systemName,
|
||||
|
||||
Reference in New Issue
Block a user