Makes your Console look pretty!
Silly-logger is a small project of mine. It's useful to make your console look pretty with a great variety and customizability of logging functions.
I'm actively working on the pack so expect to update the package more often in the starting time, tho major features are already in it, some minor ones will be added frequently.
- Install
- Highlights
- Usage
- Customization
- Log to files
- Version explenation
$ npm install silly-logger
- Customizeable
- Simple to use
- Actively Maintained
const logger = require('silly-logger');
// or
import * as logger from 'silly-logger';
// Logger presets
logger.info("Nice Information here");
logger.success("I'm up and running!");
logger.error("Oh no Some error happend here");
logger.crash("Fabulous Crashes (hopefully not)");
logger.warn("Warning! Something didn't work...");
logger.debug("I like Llamas");
logger.startup("Program starting");
logger.deploy("Deployed Command");
const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';
// logger.custom('PREFIX', 'COLOR', 'TEXTCOLOR', "TEXT")
// Custom Logger Messages with hex code
logger.custom('WONDERFUL', '#ffffff', '#F5A9F2',"Some Message here");
logger.custom('LOL', '#F5A9F2', '#618FB1',"That's so funny");
logger.custom('DARLING', '#618FB1', '#ffffff',"A wunderful DC-Bot for everyone");
const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';
// logger.custom('PREFIX', 'COLOR', 'TEXTCOLOR', "TEXT")
// Custom Logger Messages with color
logger.custom('red', 'red', 'red', "red");
logger.custom('orange', 'orange', 'orange',"orange");
logger.custom('gold', 'gold', 'gold', "gold");
logger.custom('yellow', 'yellow', 'yellow', "yellow");
logger.custom('green', 'green', 'green', "green");
logger.custom('dark_green', 'dark_green', 'dark_green', "dark_green");
logger.custom('teal', 'teal', 'teal', "teal");
logger.custom('cyan', 'cyan', 'cyan', "cyan");
logger.custom('light_blue', 'light_blue', 'light_blue', "light_blue");
logger.custom('blue', 'blue', 'blue', "blue");
logger.custom('dark_blue', 'dark_blue', 'dark_blue', "dark_blue");
logger.custom('blurple', 'blurple', 'blurple', "blurple");
logger.custom('purple', 'purple', 'purple', "purple");
logger.custom('fuchsia', 'fuchsia', 'fuchsia', "fuchsia");
logger.custom('magenta', 'magenta', 'magenta', "magenta");
logger.custom('dark_magenta', 'dark_magenta', 'dark_magenta', "dark_magenta");
const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';
// logger.timeFormat('STRING');
// Change the Format of the Date globally (https://momentjs.com/)
logger.timeFormat('DD-MM-YYYY');
logger.info('Testing DD-MM-YYYY');
logger.timeFormat('h-mm-ss a');
logger.info('Testing h-mm-ss a');
logger.timeFormat("MMM Do YY - h:mm:ss a");
logger.info('Testing MMM Do YY - h:mm:ss a');
Create a folder for your logs. Enable the function and set the path, BEFORE you use the logger!
const logger = require('silly-logger');
//or
import * as logger from 'silly-logger';
// logger.enableLogFiles(true/false);
logger.enableLogFiles(true);
// logger.logFolderPath('PATH');
logger.logFolderPath('./logs');
Example Version: v1.2.3
-
1 = Project Stage Currently, no Plans for this Number.
-
2 = Major Update Major updates are Updates where the code majorly changes, so you as a consumer have to check the functionality of your program while using this package.
-
3 = Minor Update Minor updates just updates little stuff, so there are no necessary but nice to have. Here will be no changes for functions or else.