Compare commits

..

No commits in common. "d565372adbcf6a2bcc7d4795d3e0ea84a038a60c" and "8fdda73c52463dd0efed5c87eeee2589c505db04" have entirely different histories.

5 changed files with 4 additions and 57 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@navy.gif/logger", "name": "@navy.gif/logger",
"version": "2.2.0", "version": "2.1.3",
"description": "Logging thing", "description": "Logging thing",
"author": "Navy.gif", "author": "Navy.gif",
"license": "MIT", "license": "MIT",

View File

@ -3,7 +3,6 @@
import Defaults from "./Defaults.js"; import Defaults from "./Defaults.js";
import { inspect } from "node:util"; import { inspect } from "node:util";
import { WriteOptions } from "./Types.js"; import { WriteOptions } from "./Types.js";
import { Logger } from "./LoggerInterface.js";
type ClientOptions = { type ClientOptions = {
name?: string, name?: string,
@ -19,7 +18,7 @@ type TransportOptions = {
type: string type: string
} }
class LoggerClient implements Logger { class LoggerClient {
static MaxChars = 0; static MaxChars = 0;
@ -89,28 +88,6 @@ class LoggerClient implements Logger {
} }
// These methods are dynamically implemented by the constructor
// eslint-disable-next-line @typescript-eslint/no-unused-vars
error (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
warn (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
status (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
info (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
debug (_str: string): void {
throw new Error('Method not implemented.');
}
} }
export default LoggerClient; export default LoggerClient;

View File

@ -1,7 +0,0 @@
export interface Logger {
error(str: string): void
warn(str: string): void
status(str: string): void
info(str: string): void
debug(str: string): void
}

View File

@ -12,7 +12,6 @@ import DiscordWebhook from '@navy.gif/discord-webhook';
import Defaults, { LogLevel } from './Defaults.js'; import Defaults, { LogLevel } from './Defaults.js';
import { Shard, WriteOptions } from './Types.js'; import { Shard, WriteOptions } from './Types.js';
import { addLogLevel } from '../index.js'; import { addLogLevel } from '../index.js';
import { Logger } from './LoggerInterface.js';
const DAY = 1000 * 60 * 60 * 24; const DAY = 1000 * 60 * 60 * 24;
@ -33,7 +32,7 @@ type WriteStreams = {
[key:string]: fs.WriteStream [key:string]: fs.WriteStream
} }
class MasterLogger implements Logger { class MasterLogger {
#_guard: string; #_guard: string;
#_logLevel: LogLevel; #_logLevel: LogLevel;
@ -226,28 +225,6 @@ class MasterLogger implements Logger {
return moment().format('YYYY-MM-DD HH:mm:ss'); return moment().format('YYYY-MM-DD HH:mm:ss');
} }
// These methods are dynamically implemented by the constructor
// eslint-disable-next-line @typescript-eslint/no-unused-vars
error (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
warn (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
status (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
info (_str: string): void {
throw new Error('Method not implemented.');
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
debug (_str: string): void {
throw new Error('Method not implemented.');
}
} }
export default MasterLogger; export default MasterLogger;

View File

@ -25,7 +25,7 @@ const logger = new MasterLogger({
console.log(logger); console.log(logger);
logger.setLogLevel(LogLevel.access); logger.setLogLevel(LogLevel.access);
console.log(logger.logLevel); console.log(logger.logLevel);
// process.exit(); process.exit();
logger.info('Test'); logger.info('Test');
const spawn = (child) => { const spawn = (child) => {