1.0.6 • Published 1 year ago

fuckyourlog v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

fuckyourlog

Library for logging everything!

npm i fuckyourlog

Why 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 log and timelog:
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
---------------------------------------------------------

  • timehead just 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.466

Colorize :art:

color - to color your messages ( if supported by the terminal )

colorsredbluecyangreenyellowmagenta
log( color.red( "I'm a red mazahaka" ) )