{"_id":"@ciklum/ng-logan","_rev":"5-d02cee2079a9c1132c1a30fc4971f447","name":"@ciklum/ng-logan","dist-tags":{"latest":"0.2.11"},"versions":{"0.2.7":{"name":"@ciklum/ng-logan","version":"0.2.7","description":"NGLOGAN - extended logger service for you angular 2+ app.","peerDependencies":{"@angular/common":"^6.0.0-rc.0 || ^6.0.0","@angular/core":"^6.0.0-rc.0 || ^6.0.0"},"main":"bundles/ciklum-ng-logan.umd.js","module":"fesm5/ciklum-ng-logan.js","es2015":"fesm2015/ciklum-ng-logan.js","esm5":"esm5/ciklum-ng-logan.js","esm2015":"esm2015/ciklum-ng-logan.js","fesm5":"fesm5/ciklum-ng-logan.js","fesm2015":"fesm2015/ciklum-ng-logan.js","typings":"ciklum-ng-logan.d.ts","metadata":"ciklum-ng-logan.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@ciklum/ng-logan@0.2.7","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"ciklum","email":"npm@ciklum.com"},"dist":{"integrity":"sha512-CDT4LY6luHUS9zZb4ibq2RJwzgP02QegEq8IdCmSi/eWhyIOL7ikKhaqFyCYheQxmT5oTCOrhwJiIXpD6XUAWw==","shasum":"c14783f5d437131b9a4699114b9692c02383df60","tarball":"https://registry.npmjs.org/@ciklum/ng-logan/-/ng-logan-0.2.7.tgz","fileCount":41,"unpackedSize":232099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5CLFCRA9TVsSAnZWagAAoHUP/2+5iYDCF/SNWc/zegig\nmpDnD6Z+lcRhh7u1Mb/Wq61iRvgnflHgGIrplVgAAukrN5Idvby/5pG+ll1x\nSSlJrb62Y4kTZs5MPiM+O9rWe6fuQWu6B1HHmPI8OjLKmbQn7QijhVDzVITw\nbu1BeRK33Ms6btm3dJS7T5d6CFPuHEnViLvwDojBN0gb5wwS74RgZ+4vb0YO\nvDiKUi3WtuPC6cK2FaXR9LBEGGuCGMzZ8TQxzVbcy8NAbp3xOPAh2tGtJ/bf\nKisOh8ldjQ24ON8bupN/Cwi+I+LqxvAcLukZAT30BNEX23hOjpBAlFaCxrS6\nHUy4ov+2ZJwj4UlIBfWxpnJNbRmUesopuRg5/kzSOacDQH01PBlBNbXIeOGk\nX9YmMV/XdTb4wwqE8I3rNtl3mlAF8hWvsFxepvJ/a7m4vieQmY7YjRAUfJtW\nmARWgh4ynKxyIgEjqzvHgaC14al1X7MUzAmGSEEaiJgYl3jJwNOV7+FK+Scb\nEgm/69sbXWXH/o5MwkK26QaKwYO4bSa6sv1rdOXrI1kszQgkJF4/bL8E79l+\nkgol3+disbAFgCNPo9Rzxhp+ToDwBkB5+zHt7cKtmhnFol6BNS5W3xJ80tad\nW8TrT4SJPM2xgMBIKzTJmc6btWix/oGwxQ7bURTFRKZQV1mf7fdQhPDqWHIx\nm+28\r\n=Qzwd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwxEdoJ5AopPoMgKFNF6V8TeffgMHWC7Qg2XoxIqWzIAiBLm+6Y6Zi4sxWFGK7ISyv1aNtTLxlXaeD0glpuqvYltQ=="}]},"maintainers":[{"name":"ciklum","email":"npm@ciklum.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-logan_0.2.7_1541677764515_0.34831009068494256"},"_hasShrinkwrap":false},"0.2.10":{"name":"@ciklum/ng-logan","version":"0.2.10","description":"NGLOGAN - extended logger service for you angular 2+ app.","peerDependencies":{"@angular/common":"^6.0.0-rc.0 || ^6.0.0","@angular/core":"^6.0.0-rc.0 || ^6.0.0"},"main":"bundles/ciklum-ng-logan.umd.js","module":"fesm5/ciklum-ng-logan.js","es2015":"fesm2015/ciklum-ng-logan.js","esm5":"esm5/ciklum-ng-logan.js","esm2015":"esm2015/ciklum-ng-logan.js","fesm5":"fesm5/ciklum-ng-logan.js","fesm2015":"fesm2015/ciklum-ng-logan.js","typings":"ciklum-ng-logan.d.ts","metadata":"ciklum-ng-logan.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@ciklum/ng-logan@0.2.10","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"ciklum","email":"npm@ciklum.com"},"dist":{"integrity":"sha512-FIni69otoHWP5a6DC2XkUVFxh1k8rLiGikWCnVAGvPcht4gdKaxiOjJTQ36vh5KicrBZ+Ve0iYRzxodWn5Sfpw==","shasum":"123eb1a15b9bcef7dca18b7377eabbed99649d39","tarball":"https://registry.npmjs.org/@ciklum/ng-logan/-/ng-logan-0.2.10.tgz","fileCount":44,"unpackedSize":292687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/v5nCRA9TVsSAnZWagAAzNUP/2O2lgvoIWkTDp5BnC2k\nzsPHVSdsI5j50FCcyOlGd9r/dTV43xV3mJ+JzkHHWDIS8wauxpzG5cC83viW\n9K2h8bnyAGImrjTvMDs/UEb+ddOJFuvPwgcyjOWK1E7Rx3u2zfD3KryRHMev\nu4jvrigDfLXFZqnnfy0302KFq2GaJRMCxUyZkRwWluZM+jUlNNJ82YQLU74a\nmS5xN0FpboZ6YfpFB+ExHyRokEW7qhb5KLFyDuGIJj50pHCJAxDhd1HoFAm2\neSRa33esJe+ka6u9hq0gr7S9AghVxmpFYzK0kLyB5w9DdwGh50rYxplVBA7+\n7kiVAB+9LYy2WbLPwVTc/6cYfP9klVaDGA4HN1sTEXXBH/zzu5pKBxi2EBSh\n+GAYVt5FU2g/DJKNHOPuOj7cpejmbSxPix5oO5WJrh5OhIu9YZ83aAZhuhZ4\nLAyHcLpjfgEVjrqsLRla9xhoOFwXSqepBDek+8XvFst2IEIbN+o7qobYRheQ\nUFAZtvrJSShmbeQIHg66sGVIHAQ294EtPiGVctZ3GOwZWKdkOa8lbDkUayAK\nX9wEI1dELcNb9gffQpo/7JcCwecjs5HjBz21fMdm2jiOgb69fQm1KGRls8qB\nE1Drl7yAMg5G3b7cBJ3qdRw7taIySjBpL+UN8mfRpF5avjvGDSCQP/KICLk0\nvopB\r\n=zH1C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRzZbeX6OWyPND7FGQirKlDhFdozrgsDNS1KeEFOOEggIhAOXGHbIZIv/7bhxjky7OQjrnXyYHR5amIe2VJCXhxQRe"}]},"maintainers":[{"email":"npm@ciklum.com","name":"ciklum"},{"email":"st_js@ciklum.com","name":"st_js"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-logan_0.2.10_1543437926690_0.16663151462854842"},"_hasShrinkwrap":false},"0.2.11":{"name":"@ciklum/ng-logan","version":"0.2.11","description":"NGLOGAN - extended logger service for you angular 2+ app.","peerDependencies":{"@angular/common":"^6.0.0-rc.0 || ^6.0.0","@angular/core":"^6.0.0-rc.0 || ^6.0.0"},"main":"bundles/ciklum-ng-logan.umd.js","module":"fesm5/ciklum-ng-logan.js","es2015":"fesm2015/ciklum-ng-logan.js","esm5":"esm5/ciklum-ng-logan.js","esm2015":"esm2015/ciklum-ng-logan.js","fesm5":"fesm5/ciklum-ng-logan.js","fesm2015":"fesm2015/ciklum-ng-logan.js","typings":"ciklum-ng-logan.d.ts","metadata":"ciklum-ng-logan.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@ciklum/ng-logan@0.2.11","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"ciklum","email":"npm@ciklum.com"},"dist":{"integrity":"sha512-vcSzKjvkgp9YkPoztIpMebw+GKA73Mcc5cP6QqcgsWSi0CkxISl38CxD/uw5YXFGEtbJRz/y4u4ZirBYXfGOfA==","shasum":"28fd99da2a7c4b94f19ebc4836e56c1df0d8918c","tarball":"https://registry.npmjs.org/@ciklum/ng-logan/-/ng-logan-0.2.11.tgz","fileCount":44,"unpackedSize":285583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCCPgCRA9TVsSAnZWagAAnJ4P/17C1q3W2H/x7RCnyp6N\nfUNSIIEKUbng41U4Ms/nR880mLTFbDNhEkfVqLp5FBqPSNxPN3Z+eWPr23ek\nT2EyIrdwsuUbefyg3aYy9f+mTP02TtFKRi8ia58ejE/zQ1gHzCR4YgjVb2lg\nVBNGBfDWcPnTOcViPaVFVYY0BNlVNR30RbDRIDnTqLh+14XIYdqq0l0FbsOT\nWjLnxBv9qoMK9ujxZLJZHQIK+eXlrI6/2EcY1LsCoZeqfndKOe78jnBa0mzN\n9HDdyHse5ZH6y15rodPP+4tG7fxPo68jDNhWiSB9/fS77i24ly5mLcZJS4sZ\nKxeviUP6i28lYGtklzU3ELHI54rxOJcAMCljX7L/AqsVTvfiKN3UKCPAbLhW\nV+kTkgA8UhjE93VL7wBP56yyUSpcd2L8B9QIy1hpN36URW/QzRw75yCx8h5F\nV5fah+eT7Cn8cEABoFPKCMc4BQ77KFzkWaWvNQ9q/3cz7JbdwGPQYQiMeG4Y\nB4xJ9yQS89BLWnoHTerDgF1vOQDjGJMsyoIdCCgkpRan4yScMGYDT/Vx+oHR\nIQlTkpL5HsphhPWYYbEOIruW85SqtusYxliGkCZxrmTZCrPNF7dIHV7VRJgx\nbE4d9FQ1n/yCagotO27PLtVBBKev6at/4cV/xxm6sHynjxf7V7Zwq8nWGC0o\nIfNp\r\n=eZ6p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNC2f0Wd0Gp57Rq4fVizpC/hLU+fcNDCSBW6F6alHxqgIgc/uxYIcaX6eaEIKESShs8svtjPwlXIrJ4fxqaKVuywI="}]},"maintainers":[{"email":"npm@ciklum.com","name":"ciklum"},{"email":"st_js@ciklum.com","name":"st_js"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-logan_0.2.11_1544037344109_0.7700006138130291"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-08T11:49:24.515Z","0.2.7":"2018-11-08T11:49:24.607Z","modified":"2022-04-04T22:59:44.514Z","0.2.10":"2018-11-28T20:45:26.836Z","0.2.11":"2018-12-05T19:15:44.323Z"},"maintainers":[{"email":"npm@ciklum.com","name":"ciklum"}],"description":"NGLOGAN - extended logger service for you angular 2+ app.","readme":"#### NGLOGAN - extended logger service for you angular 2+ app.\n[![pipeline status](https://gitlab.ciklum.net/st-js/ng-logan/badges/master/pipeline.svg)](https://gitlab.ciklum.net/st-js/ng-logan/commits/master)\n[![coverage report](https://gitlab.ciklum.net/st-js/ng-logan/badges/master/coverage.svg)](http://st-js.gitlab.ciklum.net/ng-logan/)\n\n\n## Table of contents \n1. [NgLogan](#ngLogan ) \n2. [Installation and usage](#installation-and-usage)\n3. [Log levels](#log-levels)\n4. [Usage and API](#usage-and-API)\n\n\n## NgLogan \nNgLogan is a library for an angular application that allows to log messages to a debugging console. It helps to debug code and you can easily hide outputs in console before deploying by changing set parameters.\n\n## Installation and usage  \nSet private registry by adding registry=http://npm.pp.ciklum.com/ to your .npmrc file.  \nInstall ng-logan library by running\n\n```npm i @ciklum/ng-logan```  \n\nService should be configurable from the main application\n\n## Configuration  \n\nThere is opportunity to register the service for root module or for feature module using forRoot() and forChild() methods. In forRoot() method you should pass configurable config with globalTitle: string, title: string, logLevel: string and ignoreLogLevel: boolean params.  \n\n```Import { NgLoganModule } from \"@ciklum/ng-logan\"``` \n\nAdd to imports:    \n```\nimports: [ \nNgLoganModule.forRoot({\nglobarlTitle: <your_glogal_title>, \ntitle: <your_local_title>, \nlogLevel: <log_level>,\nignoreLogLevel: <ignore_param>\n}) ]\n``` \n- *__for root module__*  \n\nAdd to  \n``` imports: [ NgLoganModule.forChild( )]```  - __*for feature modules*__  \n\n__For example__:      \n```\n    NgLoganModule.forRoot({\n      globalTitle: 'My global',\n      title: 'My local title',\n      logLevel: 'warn',\n      ignoreLogLevel: false\n    }),\n```\n\n## Log levels \nNgLoganService supports next types of logLevels:  \n__log__  \n__debug__    \n__info__    \n__warn__    \n__error__      \nEvery logLevel has value, __*log*__ and __*debug*__ has the lowest value, __*error*__ level has the biggest value. If you set the __*error*__ logLevel in default config, then only console.error will work and other methods with lower values won't work. If you set the __*info*__ logLevel in default config, only console.info, console.warn, console.error will work.\nDefault logLevel value is __*debug*__.\n\n\n## Usage and API    \n### NgLoganService\nIf we inject NgLoganService in a component, we get messages in console with title from config.\n```\nexport class TempComponent implements OnInit {\n \n  constructor(private ngLoganService: NgLoganService) { }\n\n  ngOnInit() {\n    this.ngLoganService.info('info method')\n    this.ngLoganService.warn('warn method')\n    this.ngLoganService.error('error method')\n  }\n}\n```\n__Result__:\n\n```\n// [My global : My local title] warn method\n// [My global : My local title] error method\n```\n\nThere is an opportunity to change local title for every module that will be desplayed in console messages. Also there is an opportunity to ignore config logLevel.  \n### @Logger decorator\n@Logger is a property decorator. It was created for setting local parameters and for easy usage of NgLoganService.\n```\n  @Logger() private readonly logger\n```\nThen you can use logger property to log some text.  \n\n@Logger decorator has next parameters:   \n##### title (optional)  \nThe parameter set unique local title for a module. If it is not set, the default title from config is used.   \n##### ignoreLogLevel (optional)  \nIf the parameter is not set, by default it is false, the output to the console depends on the logLevel from config. If the parameter is true, it allows to ignore logLevel from config, every method of console will work.  \n\n__For example__:  \nWe have *warn* logLevel in config.  \nIn the first example we will see the message in console, but in the other example we won't, because in it ignoreLogLevel is not added and it is false by default.\n```\nexport class AppComponent implements OnInit {\n  @Logger({title: 'AppModule', ignoreLogLevel: true}) private readonly logger\n\n  constructor() {}\n\n  ngOnInit() {\n    this.logger.info('my text will be in console')\n  }\n}\n```\n__Other example__\n```\nexport class NewComponent implements OnInit {\n  @Logger({title: 'AppModule'}) private readonly logger \n\n  constructor() {}\n\n  ngOnInit() {\n    this.logger.info(\"my text won't be in console\")\n  }\n}\n```  \n\n__Result__:  \n```\n// [My global : AppModule] my text will be in console  \n```\n### @loganClass and @loganMethod\n\nIt's also possible to use NgLoganService with decorators __@loganClass__ or __@loganMethod__ for a class or a method.  \nDecorator @loganClass consoles the parameters and results of all methods of a class.\n\n@loganMethod consoles the parameters and results of a method for which the decorator is added.   \nAn optional parameter for these decorators is logLevel: @loganClass('error') or @loganMethod('info'). Default logLevel value is *debug*.  \n\n\n\n__Class decorator example__:\n```\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.css']\n})\n@loganClass('warn')\n\nexport class AppComponent implements OnInit {\n  @Logger({title: 'AppModule', ignoreLogLevel: true}) private readonly logger\n\n  constructor() {}\n\n  ngOnInit() {\n    this.sayHello('Max');\n    this.sayBye('Max');\n  }\n\n  sayHello(name) {\n    return `Hello, ${name}`\n  }\n  sayBye(name) {\n    return `Bye-bye, ${name}`\n  }\n}\n```\n__Result__:\n```\n// [My global : AppModule] AppComponent - sayHello - parameters:  [\"Max\"]   \n// [My global : AppModule] AppComponent - sayHello - results:  Hello, Max     \n// [My global : AppModule] AppComponent - sayBye - parameters:  [\"Max\"]   \n// [My global : AppModule] AppComponent - sayBye - results:  Bye-bye, Max  \n```\n\n\n__Method decorator example__:\n```\nexport class TestComponent {\n  @Logger({title: 'TempModule', ignoreLogLevel: true}) private readonly logger\n \n  @loganMethod('info')\n  init(value) {\n    return value * value\n  }\n}\n```\n__Result__:\n```\n//  [My global : TempModule] TestComponent - Init - parameters: [5]   \n//  [My global : TempModule] TestComponent - Init - results: 25  \n```\n\nIf you want to hide all messages in console, change logLevel in config to 'error'.\n","readmeFilename":"README.md"}