darekf77 / ng2-logger

Isomorphic logger for Browser and NodeJS, ( typescript / javascript ) apps
MIT License
61 stars 17 forks source link

Strange output when built for production #27

Closed jimmykane closed 7 years ago

jimmykane commented 7 years ago

Hi there,

nice project.

I have an issue though. When I build the project for production then, for example, a simillar part of code:

this.logger.d('Retrieved all points after ' +
      (performance.now() - t0) + ' milliseconds or ' +
      (performance.now() - t0) / 1000 + ' seconds'
    );

Gets printed as:

screen shot 2017-09-16 at 19 24 35

Instead of:

screen shot 2017-09-16 at 19 25 27
jimmykane commented 7 years ago

I was setting the logger name via a the constructor name of the logging class. Guess what minifiers do. ...

Closing.