-
Include
Logger
into your web page:- JavaScript
<script src="logger.js"></script>
- TypeScript
import {Logger} from './logger';
-
Usage:
- JavaScript
var Example = {}; Example.functionX = function () { var varX = {a: 1, b: 2}; Logger.info('Example', 'functionX', 'varX', varX); Logger.warn('Example', 'functionX', 'varX', varX); Logger.error('Example', 'functionX', 'varX', varX); };
- TypeScript
@Injectable() export class ExampleService { index(page: number, size: number) { Logger.info(ExampleService.name, 'index', `page=${page}, size=${size}`); Logger.warn(ExampleService.name, 'index', `page=${page}, size=${size}`); Logger.error(ExampleService.name, 'index', `page=${page}, size=${size}`); } }
-
Notifications
You must be signed in to change notification settings - Fork 0
beantoan/LoggerJS
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A logger for JavaScript/TypeScript
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published