outputjs
📝 A simplistic node.js logger that can be configured to the max.
- No configuration necessary!
- Name & Color support!
- Automatic padding!
- Info, Success, Error, and warn functions!
- A debug function that can be toggled!
- Automatic name & color selection!
Usage
You can choose to either pass options as an argument...
const logger = ;const chalk = ;const options = name: 'server' //Name of the logger. Will be displayed in [] tags. DEFAULT: Name of caller file color: chalkbgGreen //Color used for highlighting the name. DEFAULT: random unique color padding: 10 //Padding with x width for the name. DEFAULT: 10 prefix: '-->' //Prefix used after the name. DEFAULT: "->" debug: true //Enables output with .debug() DEFAULT: false debugPrefix: 'D: ' //Prefix used for debugging. DEFAULT: "DEBUG:" filePath: 'output.js' //Outputs everything to a file. Doesn't support colors. DEFAULT: falseconst server = options;
...or simple go with no configuration at all.
const logger = ;const server = ;
The following functions are available to you:
server;server;server;server;server;