itivrutaha v3.1.0
itivrutaha is my first ever JavaScript (initially) project. It is a Bun-first (developed, tested with Bun but also works in Node) console logging module to be used in CLIs, GUI desktop apps & web servers.
Tweet me @vsnthdev, I would love to know your opinion/experience on this project š
š Migrating from v2.x
Version 3 is a complete rewrite with several features removed, trimmed down and optimized, while modernizing the codebase and adding Bun.js support.
The v2.x.x versions can be found in the v2 branch containing the older version of itivrutaha.
ā ļø Major changes
- Luxon has been replaced in favor of date-format which is more lightweight.
- Removed automatic logs when app starts, and how long it ran when the app exists. (An additional utility will be shipped in a later version.)
- The
verboseIdentiferandquietIdentifierconfig option has been removed. v3no longer uses TypeScript classes, favors functional approach instead.- Multiple scopes (previously contexts) are now support by single instance of
itivrutahaunlike previous. - File logging was completely removed.
- The
:messagevariable has been replaced by:msg. - Following variables are no longer supported
:node_path,:script_path,:node_version,:v8_version,:filename,:openssl_version,:electron_version. These will be added again on request basis.
ā”ļø Features
- Easy to customize according to your needs
- Flexible theming support with chalk
- Different log levels (ex. silent, verbose etc) (Planned)
- Ability to log without any ANSI characters (Planned)
- Support for uppercase message types (ex. INFO instead of info) (Planned)
šæ Installation
bun i itivrutaha
npm i itivrutaha # if you're using Node.jsš“āāļø Quick Start
After itivrutaha has been installed, you start using it by the following way š
import { itivrutaha, defaultConfig } from 'itivrutaha'
const log = itivrutaha(defaultConfig)
// errors can be given directly, logs nicely
log.error(new Error('Ouch!'))
// additional data can also be given for extra context
log.note('Point to be noted', { someData: 'very useful' })
// entire thing can also be an object
log.okay({
msg: 'Not an info message'
})
// a scope can be attached to easily identify
// which part of the application this log came from
log.success('Makes users happy', {}, 'web')
// entire thing can also be an object
log.info({
msg: 'Nice to know something is happening',
scope: 'web',
extra: 'data',
maybeAnError: new Error('Something broke') // will be printed with trace
})
// supports emoji, colors and theming
log.verbose("Always makes developer's life easy š")š Building
bun installā Installs required dependencies.bun run devā Watches for changes & runs TypeScript compiler.bun run buildā Freshly compiles TypeScript code.npm run docsā Freshly builds by reading code and templates.
ā¹ļø Note: You can run bun run examples/index.ts to test itivrutaha with the latest code.
š° License
The itivrutaha project is released under the MIT license.
vsnth.dev Ā Ā·Ā YouTube @vsnthdev Ā Ā·Ā Twitter @vsnthdev Ā Ā·Ā Discord Vasanth Developer
10 months ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago