▲ | Show HN: I've made an easy to extend and flexible JavaScript logger(github.com) | |||||||||||||
17 points by inshinrei 5 days ago | 9 comments | ||||||||||||||
hi! I've made a logger for JS/TS. It's easily extendable, easy to use and configure. Would like to hear a feedback from you! | ||||||||||||||
▲ | Thomaschaaf 4 days ago | parent | next [-] | |||||||||||||
Can you give insights into what makes it different from e.g. pino[1]? It's amazingly even faster than console.logging because of the way it buffers the data. | ||||||||||||||
| ||||||||||||||
▲ | gus_massa 5 days ago | parent | prev | next [-] | |||||||||||||
In case someone miss the link at the bottom of the readme, there is a detailed explanation in https://github.com/inshinrei/halua/blob/main/docs/tour_of_ha... | ||||||||||||||
| ||||||||||||||
▲ | cluckindan 4 days ago | parent | prev | next [-] | |||||||||||||
It would be great to have debug-like namespacing / filtering, combined with log levels. | ||||||||||||||
| ||||||||||||||
▲ | lnxg33k1 4 days ago | parent | prev | next [-] | |||||||||||||
Doesn't seem flexible, seems mostly non-alterable, probably easily extendable is a thing, but I've been mostly productive with stuff that would allow me to don't duplicate existing behaviours but hook into them, that's flexibility imho, if I want to change some of the behaviour of an existing handler I have to reimplement it completely, then it's not flexible, the classes also seem quite giant, making me thing even more it's not really flexible/extendable | ||||||||||||||
▲ | inshinrei 4 days ago | parent | prev [-] | |||||||||||||
i'm also leaving an example of production app setup here: import {Level, halua, NewTextHandler, NewJSONHandler, NewWebConsoleHandler} from 'halua' // an array of handlers that would accept logs let handlers = [
]if (debug) {
}// now we have to apply the handlers we created let logger = halua.New(handlers) // or halua.setHandler(handlers) // later, you may call .New on any logger instance to get a new instance |