*remove log debugging code
This commit is contained in:
parent
457398b291
commit
56673a6bc1
|
@ -74,22 +74,4 @@ prefix.apply(log, {
|
|||
},
|
||||
});
|
||||
|
||||
const logFactory = log.methodFactory;
|
||||
|
||||
let messageLog: string[] = [];
|
||||
|
||||
log.methodFactory = function (methodName, logLevel, loggerName) {
|
||||
var rawMethod = logFactory(methodName, logLevel, loggerName);
|
||||
|
||||
return function (...messages) {
|
||||
messageLog = messageLog.concat(messages);
|
||||
rawMethod(...messages);
|
||||
};
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
log.getLogs = function (): string[] {
|
||||
return messageLog;
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
@ -177,14 +177,6 @@ const plugin: Plugin = {
|
|||
return [...getRpcServer().cache.dhtCache.connectedTo];
|
||||
},
|
||||
});
|
||||
|
||||
api.registerMethod("get_logs", {
|
||||
cacheable: false,
|
||||
async handler(): Promise<string[]> {
|
||||
// @ts-ignore
|
||||
return api.logger.getLogs();
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue