1.0.6 • Published 3 years ago
fuckyourlog v1.0.6
fuckyourlog
Library for logging everything!
npm i fuckyourlogWhy has been 1 package added? No dependencies, easy and clean code.
Get started :cat:
Get started with this:
const { log, timelog, bufferlog, timehead, color } = require("fuckyourlog");or
import { log, timelog, bufferlog, timehead, color } from "fuckyourlog";Methods :aerial_tramway:
- Try logging something
logandtimelog:
log( "I don't need to write the 'console' any more" );
timelog( "Wow, I can see the time head" );Log result:
I don't need to write the 'console' any more
01:14:26.295 # Wow, I can see the time head- You can log buffers and see offsets:
bufferlog:
bufferlog( Buffer.from("Take a look at this, buffer looks great") );Log result:
BUFFER 39 -----------------------------------------------
000000 | 54 61 6b 65 20 61 20 6c 6f 6f 6b 20 61 74 20 74
000010 | 68 69 73 2c 20 62 75 66 66 65 72 20 6c 6f 6f 6b
000020 | 73 20 67 72 65 61 74
---------------------------------------------------------And with a custom title:
bufferlog( Buffer.from("1234567890"), "CUSTOM TITLE" )Log result:
CUSTOM TITLE 10 -----------------------------------------
000000 | 31 32 33 34 35 36 37 38 39 30
---------------------------------------------------------timeheadjust a timestamp applied to a string
let time_now = timehead();
let time_date = timehead( Date.now() );
log( time_now )
log( time_date )Log result:
01:21:41.466
01:21:41.466Colorize :art:
color - to color your messages ( if supported by the terminal )
| colors | red | blue | cyan | green | yellow | magenta |
log( color.red( "I'm a red mazahaka" ) )