RfxLogger
An upgrade for your console messages
Features
- One-line compact view
- All messages have intuitive colors
Message tag supports HTTP codes (coming soon)
Installation
Install the npm package:
npm install rfx-logger
Import module:
config
is optional if you want to disable debug data. Default is false
import { RfxLoggerModule } from 'rfx-logger';
@NgModule({
imports: [
RfxLoggerModule.config({
disableDebug: true
})
]
})
Usage
import { RfxLoggerService } from 'rfx-logger';
[...]
constructor(rfxLoggerService: RfxLoggerService) { }
[...]
this.rfxLoggerService.success(title, data);
this.rfxLoggerService.warning(title, data);
this.rfxLoggerService.error(title, data);
-
title
custom string (eg. function name)
-
data
optional, any object you want to print with the debug message (eg. backend data)
Demo
TODO
License
This project is licensed under the MIT License