feat(ts): initial

This commit is contained in:
2018-01-28 04:31:06 +01:00
parent 42eda7bbf2
commit 3472ddfad7
17 changed files with 644 additions and 54 deletions

View File

@ -1,21 +1,13 @@
import 'typings-global'
import * as plugins from "./smartlog.plugins";
import { Smartlog } from "./smartlog.classes.smartlog";
export registerLogger = () => {
export { Smartlog };
}
let defaultLogger: Smartlog;
export error = (logString: string) => {
console.error(logString)
}
export info = (logString: string) => {
console.info()
}
export log = (logString: string) => {
console.log(logString)
}
export warn = (logString: string) => {
console.warn(logString)
}
export const getDefaultLogger = () => {
if (!defaultLogger) {
defaultLogger = new Smartlog();
}
return defaultLogger;
};