Skip to content

Latest commit

 

History

History
67 lines (53 loc) · 1.4 KB

README.md

File metadata and controls

67 lines (53 loc) · 1.4 KB

fallout-utility

npm i fallout-utility
yarn add fallout-utility
pnpm add fallout-utility

Quick start

CommonJs
const util = require("fallout-utility");
ES Modules
import utils from "fallout-utility";

Logger Usage

import { Logger } from 'fallout-utility/Logger';

const logger = new Logger();

// Log to file
await logger.createFileWriteStream({
    file: './logs/latest.log'
});

// Logs like console.log but also puts content to a file
logger.log('Fallout util');

// Other log methods
logger.warn(`Warning!`); // alias for logger.warning
logger.warning(`Warning!`);

logger.err(`Error!`); // alias for logger.error
logger.error(`Error!`);

logger.debug(`Debug!`); // Logs messages only on debug mode