silibdev / typescript-logger Goto Github PK
View Code? Open in Web Editor NEWA simple categorized logger for typescript (based on the idea of ng2-logger)
A simple categorized logger for typescript (based on the idea of ng2-logger)
Using the typescript-logger in a node/express project the window. So it does not work in node
If the logger depends on the window object, the logger README.md file should not that it should not be used in a node-server environment
ts-node-dev --respawn --transpileOnly ./src/server.ts
Using ts-node version 8.9.0, typescript version 3.8.3
ReferenceError: window is not defined
at C:\...\node_modules\typescript-logger\build\loggerManager.js:102:9
at C:\...\node_modules\typescript-logger\build\loggerManager.js:112:7
at Object.<anonymous> (C:\...\node_modules\typescript-logger\build\loggerManager.js:114:2)
When you call the logger with parameters, the display is not as expected :
this.logger('First parameter : %o, second one : %o', 42, 'foo');
the result must be something like :
First parameter : 42, second one : foo
but we get
First parameter : array[2], second one : %o
A correction, in logger.js
:
Logger.prototype.warn = function (name) {
var data = [name, level_1.Level.WARN];
for (var _i = 1; _i < arguments.length; _i++) {
data.push(arguments[_i]);
}
return this._logMessage.apply(this, data);
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.