ark-ng-log
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Simple angular library for colorful console log..!

Simple angular utility library for colourful console log conditionally enable...

  • if in devMode then all looging verbose is enabled & the console output, but in prodMode by default log is diabled.

npm install: Generic badge

    npm i ark-ng-log

Documentation

-- Supported logs -> info, warn, error, success

1. Use in Component

import { ArkLog } from 'ark-ng-log';

  export class AppComponent {
constructor(private log: ArkLog)
getConfigValue() {
    log.info('TAG',  'Some Detail message for console logg...'); // prints on the output in the console with appropriate color styling
    log.success('TAG',  'Some Detail message for console logg...');
    log.error('TAG',  'Some Detail message for console logg...');
    log.warning('TAG',  'Some Detail message for console logg...');
}

id devMode: all log is set to true & in prodMode this is set to false; manually change thee properties to either enable or diable the appropriate log.

var arklog = {
    info: true,
    warn: true,
    succ: true,
    error: true
}

}

cheat sheet:
-> 
-> in develper console declare below variables to enable or disable specific prints.
 var arklog.info = true/false; // Enable or disable the info logs


functions:
-- this.config.getValue('globalvar')
-- this.config.getIp(); // Returns the current public ip (used - ipify.org internally)

Note: include 'HttpClientModule' in app.module.ts, since this is used to detect IP  
  import { HttpClientModule } from '@angular/common/http';

  imports: [
        HttpClientModule
    ]

Tested on modern browsers 
Issues: raj@immanuel.co

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i ark-ng-log

Weekly Downloads

0

Version

0.0.3

License

none

Unpacked Size

49.8 kB

Total Files

20

Last publish

Collaborators

  • jimmanuel