fullstack-build / tslog

📝 tslog - Universal Logger for TypeScript and JavaScript
https://tslog.js.org
MIT License
1.35k stars 63 forks source link

Feature Request: [Feature] #264

Closed FreePhoenix888 closed 1 year ago

FreePhoenix888 commented 1 year ago

Description / Use Case for a Feature

Add possibility to extend name.

I wanted to use this library instead of debug library which can extend namespaces. For some reason there is no such possibility. Why?

terehov commented 1 year ago

Can you elaborate what you exactly mean? Thank you

FreePhoenix888 commented 1 year ago

Can you elaborate what you exactly mean? Thank you

What I can do when I use debug library:

import _debug from debug
const debug = _debug("myPackageName")
const moduleDebug = debug.extend("myModuleName")
const moduleLog = debug.extend('log')
const moduleError = debug.extend('error')
terehov commented 1 year ago

You can already do this with https://tslog.js.org/#/?id=sub-logger

FreePhoenix888 commented 1 year ago

Thank you, @terehov !