Coder Social home page Coder Social logo

bs-logger's People

Contributors

huafu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bs-logger's Issues

Great work

Hi @huafu , I've looked at about 10 different logging solutions, and while bs-logger isn't perfect, it's my favourite so far. Thank you.

The main issue I see is how it treats the first parameter differently to how console.log() does. If the parameter is an object, this library assumes it is a context object. Whereas console.log() handles Error objects differently to other objects, and doesn't interpret the object as a configuration parameter.

Having said that, bs-logger has a few advantages over most loggers:

  • simple configuration
  • easy to add a file target and multiple targets (using string is handy, if not exactly readable)
  • no need to start or stop the log
  • no async methods to deal with

Great job ๐Ÿ‘

Cannot find module '.' from 'node_modules/bs-logger/dist/logger/root.js'

Hi !

I have an issue I had not been able not able to understand.
Your module are implicated in it but it doesn't mean it is caused by it.
Here is what I know.
In my gitlab pipeline, when jest is executed to run some unit tests, I have the following error :

  โ— Test suite failed to run
    Cannot find module '.' from 'node_modules/bs-logger/dist/logger/root.js'
    Require stack:
      node_modules/bs-logger/dist/logger/root.js
      node_modules/bs-logger/dist/index.js
      node_modules/ts-jest/dist/utils/logger.js
      node_modules/ts-jest/dist/presets/create-jest-preset.js
      node_modules/ts-jest/utils/index.js
      src/functions/other/version/handler.spec.ts
      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (node_modules/bs-logger/dist/logger/root.js:35:10)

What is strange is that I don't have this error when I run the command locally, nor when I run the command manually inside a docker container based on the same docker image my gitlab ci pipeline is using.
It seems the only reference to your module is through jest, I don't use your module directly and it doesn't seem to be used by my other external dependencies (according to npm ll)
I guess my description will not be enough to help, but I share it anyway in case someone encounter it too.

Thanks anyway for contributing to the open-source world.

Regards

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.