GithubHelp home page GithubHelp logo

dormd / rich-logger-decorator Goto Github PK

View Code? Open in Web Editor NEW
97.0 1.0 19.0 133 KB

Rich Logger Typescript Decorator for Easy Coding & Debugging

Home Page: https://medium.com/@dormoshe/rich-typescript-logger-decorator-for-easy-coding-fc2ff73684c6

License: MIT License

TypeScript 100.00%
typescript javascript debugging decorators angular web nodejs

rich-logger-decorator's People

Contributors

dormd 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  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  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

rich-logger-decorator's Issues

Some suggestion for improving

Logger should comprehend and printout the tree of classes, not only the last ancestor’s name.
Currently, it prints the ancestor class’ name, when base class method is called, even if @ClassLogger set to base class only.

That also means that when you redefine a method in the ancestor and call the base class method with super, it is very hard to comprehend which method with the same name was called.

Also, of course, it would be much more useful to have an option of binding the logging with the console in order to see the exact place of logging, instead of messages.helper.js.

It also will be nice, having your code to fulfill the TSLint Reqs.

Support promises

I think it would be a nice idea to be able log when promises are resolved or rejected. Currently it seems that just the return of a method call is logged, while all the interesting stuff happens later in case a promise is returned.

Provide a way to set up a global configuration

It would be nice if there was an entry point, such as a settings file, where I could configure specific configurations that would be valid on the whole application.

For instance, setting up "logFunction" in a single place that would work for the whole application instead of having to provide it to every single decorator usage.

Compatible with Angular >= 2 ?

Hi, I want to create a decorator logger library for an application in Angular 4. You're library is compatible or not ?
Thank you.

Wrong Import?

When importing with

import { ClassLogger, Logger } from 'rich-logger-decorator';

I will get the follwing error:

Module build failed: Error: ENOENT: no such file or directory, open '...\node_modules\rich-logger-decorator\src\index.js'

In order for it to work, I have to

import { ClassLogger, Logger } from 'rich-logger-decorator/dist/src';

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.