├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── package-lock.json ├── package.json ├── projects ├── demo │ ├── browserslist │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.json │ ├── karma.conf.js │ ├── src │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── code-snippet │ │ │ │ ├── code-snippet.component.css │ │ │ │ ├── code-snippet.component.html │ │ │ │ ├── code-snippet.component.spec.ts │ │ │ │ └── code-snippet.component.ts │ │ │ ├── example │ │ │ │ ├── example.component.css │ │ │ │ ├── example.component.html │ │ │ │ ├── example.component.spec.ts │ │ │ │ └── example.component.ts │ │ │ └── home │ │ │ │ ├── home.component.css │ │ │ │ ├── home.component.html │ │ │ │ ├── home.component.spec.ts │ │ │ │ └── home.component.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.png │ │ ├── index.html │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.css │ │ └── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json └── ngx-fancy-logger │ ├── README.md │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── src │ ├── lib │ │ ├── ngx-fancy-logger.module.ts │ │ ├── ngx-fancy-logger.service.spec.ts │ │ └── ngx-fancy-logger.service.ts │ ├── public-api.ts │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ ├── tsconfig.spec.json │ └── tslint.json ├── sample-images ├── debugOperator.png └── logLevels_header.png ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ngx-fancy-logger 2 | 3 | ngx-fancy-logger is a console logger for angular applications. It provides various features like different log levels, display labels, show time etc. 4 | 5 | # [Read Detailed Documentation](./projects/ngx-fancy-logger/README.md) | [NgxFancyLogger HomePage / Demo](https://ngx-fancy-logger.netlify.app/) 6 | 7 | ## Key Features 8 | 9 | - Different Log Levels (DEBUG=0, INFO=1, WARNING=2, ERROR=3). 10 | - Log Levels are displayed in Label form with assigned color style or default colors. 11 | - Show/Hide Time 12 | - Show/Hide Emoji for each Log Level 13 | - Show Header on console (`color` and `fontSize` configurable) 14 | - Debug RxJS Observable Stream using `debugOperator()` operator function 15 | - Can configure each setting with `LoggerConfig` in `forRoot` (which allows us to configure `environment` specific configuration) or using `updateConfig()` method. 16 | - Reset configuration using `resetConfig()` method 17 | - Environment Specific Log Level Restriction. 18 | eg. if you set `logLevel` to `WARNING`, it will only show logs for `WARNING` and `ERROR`. 19 | - Can configure Log Level Colors. 20 | - Can Disable all logs 21 | 22 | ## Sample Usage Screenshots 23 | 24 | ### Header and Different Log Level Sample Logs 25 | 26 |  27 | 28 | ### Debug RxJS Observable Stream using `debugOperator()` operator function 29 |  operator function") 30 | 31 | 32 | ## Demo 33 | [Ngx-Fancy-Logger Demo with All available configuration options](https://ngx-fancy-logger.netlify.app/#/demo) 34 | 35 | ## Contribute 36 | All are welcome to contribute to `NgxFancyLogger`. Contribute with some code, file a bug or improve the documentation. 37 | 38 | ## Contributors ✨✨✨ 39 | 40 | Thanks goes to these wonderful people. 41 | 42 | 43 | 44 | 45 |
48 |
49 | 51 | Ankit Prajapati 52 | 53 | |
54 |
55 |
56 | 58 | Jiten (Jits) Bhagat 59 | 60 | |
61 |
3 |
4 |
5 | debugOperator()
operator function
48 | logLevel
to LogLevel.WARNING
, it will only show logs for WARNING
and ERROR