style: apply prettier formatting to all files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
||||
*/
|
||||
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
|
||||
export enum ButtplugLogLevel {
|
||||
Off,
|
||||
@@ -69,9 +69,7 @@ export class LogMessage {
|
||||
* Returns a formatted string with timestamp, level, and message.
|
||||
*/
|
||||
public get FormattedMessage() {
|
||||
return `${ButtplugLogLevel[this.logLevel]} : ${this.timestamp} : ${
|
||||
this.logMessage
|
||||
}`;
|
||||
return `${ButtplugLogLevel[this.logLevel]} : ${this.timestamp} : ${this.logMessage}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,10 +174,7 @@ export class ButtplugLogger extends EventEmitter {
|
||||
*/
|
||||
protected AddLogMessage(msg: string, level: ButtplugLogLevel) {
|
||||
// If nothing wants the log message we have, ignore it.
|
||||
if (
|
||||
level > this.maximumEventLogLevel &&
|
||||
level > this.maximumConsoleLogLevel
|
||||
) {
|
||||
if (level > this.maximumEventLogLevel && level > this.maximumConsoleLogLevel) {
|
||||
return;
|
||||
}
|
||||
const logMsg = new LogMessage(msg, level);
|
||||
@@ -191,7 +186,7 @@ export class ButtplugLogger extends EventEmitter {
|
||||
console.log(logMsg.FormattedMessage);
|
||||
}
|
||||
if (level <= this.maximumEventLogLevel) {
|
||||
this.emit('log', logMsg);
|
||||
this.emit("log", logMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user