Un

Universal Logger for Node, Deno, Bun, Browser

Hacker News

Universal Logger for Node, Deno, Bun, Browser

Hey everyone, I had posted about my project https://adzejs.com a couple of years ago and it was met with a lot of interest, so I'm writing about the major v2 update that's just been released to see if anyone is interested. What makes Adze interesting compared to other logging libraries like pino, bunyan, winston, etc? Adze is universal. This means that Adze will "just work" in all of your environments. This is especially handy when working with SSR projects like sveltekit, nuxt, next, etc. You can also use Adze with Bun or Deno without any special adaptations or considerations. Adze 2.x is also smaller (13.29kb minified and brotlied) and faster than the original. Benchmarks put it at generating 100,000 logs in ~700ms. Version 2 also offers a cleaner API than version 1 as it no longer uses factories and instead uses static class methods. import adze from 'adze'; // Generating a log adze.timestamp.ns('foo').log('A log with a timestamp and namespace.'); // Making a child logger const logger = adze.timestamp.ns('foo').seal(); logger.log('A log with a timestamp and namespace.'); Adze 2.x comes with support for four different types of log formats out-of-the-box. These formats include: - a human-readable pretty format - a machine-readable JSON format that is compatible with the Bunyan CLI - a format for common logs - and a format for simple stdout logging Adze 2.x also offers better extensibility support. You can now create custom formatters and custom middleware for modifying log behavior or transporting them to another source (like a file, etc). Log listeners are also still supported. Changing formats is easy. import adze, { setup } from 'adze'; setup({ format: 'json', // <- Change with an env var }); adze.withEmoji.success('This is a pretty log!'); Adze 2.x also includes a handy new template literal logging feature for times where you are repeating logs frequently with slightly different messages (like error messages in a catch). Adze offers a new sealTag terminator that will seal your configuration into a template literal tag function to further simplify your logging. Example import adze from 'adze'; // Let's create a reusable ERR tag with emoji's, timestamps, and the "my-module" namespace. const ERR = adze.withEmoji.timestamp.ns('my-module').sealTag(); try { // do something that could fail... } catch (e) { ERR`Printing my error as an error log! ${e}`; } There is much, much more to Adze than what I can present in this post, but please check it out at https://adzejs.com and let me know what you think! Try it out! Also, please give it a star to bookmark it at https://github.com/adzejs/adze if you might use it in the future! I appreciate any feedback as well. This has been a huge labor of love for me and I hope it benefits you all as well. Thank you!

Share card

Actual performance

51points
24comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: compatible · Missing: supports, reddit linkedin, podcasting
87%87% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: mac, new · Missing: agents, macos, agent
58%58% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, 000, io · Missing: https docs, excited, just released
37%37% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
35%35% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
34%34% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

te
test node-minimatch globs in your browser.35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

test node-minimatch globs in your browser.

Hacker News2
NB
NBLAS, Node C++ bindings to CBLAS36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

NBLAS, Node C++ bindings to CBLAS

Hacker News13
Sc
Scaffold out a modest node module27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Scaffold out a modest node module

Hacker News3
Th
This is a valid node module30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

This is a valid node module

Hacker News2
Na
Nact – Actor System for Node and ReasonML42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Nact – Actor System for Node and ReasonML

Hacker News11
no
node-scrunch42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

node-scrunch

Hacker News1
Mo
MongoSync for Backbone/Node42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

MongoSync for Backbone/Node

Hacker News2
No
Node Knockout 2013 entries28%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Node Knockout 2013 entries

Hacker News1
no
node-mongoose-fixtures42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

node-mongoose-fixtures

Hacker News1
As
Assert.env: one fell swoop loading and asserting settings in node24%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Assert.env: one fell swoop loading and asserting settings in node

Hacker News2