Coder Social home page Coder Social logo

anylogger's People

Contributors

download avatar greenkeeper[bot] avatar jirutka avatar toddb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

anylogger's Issues

Future plans

Hello @Download. I last commented on a closed issue and I was wondering what your current plan is for anylogger packages.

Monorepo aside, I would be interested in contributing to move this forward.

Anylogger instance in library never outputs to console in application

I've implemented anylogger in a library I'm authoring in TypeScript. Unfortunately, the anylogger instance in my library is never updated by any adapters I try to use in an application (also TypeScript) that uses this library, so no logging in my library ever appears in the application's console output.

To keep things simple I'm using import 'anylogger-console' in the application that's consuming my library, but I also have this issue when I try with ulog.

I've created a repo reproducing the issue. The README.md file within contains basic reproduction steps:

https://github.com/MasterKale/anylogger-bug-repro-17

Type declarations do not accurately represent the package

Hello. I noticed that with latest typescript, using moduleResolution: "Node16", the package stops working because it is not an ESM package (no type: "module") but the type declaration represents a module export default anylogger

I might propose to simply change that to export = anylogger but given that the source itself is written as a module and even bundled in the package, I might propose actually going for a "proper" dual package.

Verify typescript definition

@jirutka
I added a method enabledFor to all loggers. I edited the typescript definition you created to the best of my ability, but I've never actually used Typescript, so could you have a look maybe and tell me if I did the right thing or not? Thanks for your help so far on this.

if a anylogger loggeris created after disabling (ulog.disable()) the disable state is not considered

I do the the following in my webapp index.js

import ulog from 'ulog';
// import anylogger from 'anylogger';
// anylogger('app:home');
ulog.disable('app:*');

and then in my home page

import anylogger from 'anylogger';
const log = anylogger('app:home');
log.info('Anylogger is easy!');

if I leave the commented line commented, the log will appear, even though I wanted to disable all of them
If I instead comment out the 2 lines, it works as intended.
Unfortunately this won't work if I use query string and it is also a shame to have to declare all loggers before hand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.