fallout-utility
v2.9.1
Published
<h1 align="center"> fallout-utility <br> </h1>
Downloads
183
Maintainers
Readme
npm i fallout-utility
yarn add fallout-utility
pnpm add fallout-utility
Quick start
const util = require("fallout-utility");
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