Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuraxdrumz/adv-logger
a color logger which shows file name and line number in console, colored randomly with chalk
https://github.com/yuraxdrumz/adv-logger
Last synced: 1 day ago
JSON representation
a color logger which shows file name and line number in console, colored randomly with chalk
- Host: GitHub
- URL: https://github.com/yuraxdrumz/adv-logger
- Owner: yuraxdrumz
- Created: 2016-12-20T09:26:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-29T14:38:14.000Z (over 7 years ago)
- Last Synced: 2024-12-04T05:41:04.525Z (20 days ago)
- Language: JavaScript
- Size: 691 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# adv-logger
[![Build Status](https://travis-ci.org/yuraxdrumz/adv-logger.svg?branch=master)](https://travis-ci.org/yuraxdrumz/adv-logger)
A simple utility method for logging similar to *console.log* , but
with file name, line number, custom typeof and random color.this utility writes using process.stdout.write,
which allows you to overwrite your console.log if you desire.it is only 125 lines long and uses 0 dependencies
![alt text](https://i.imgsafe.org/e7cf4ed101.png)
## Usage
1.3.2 - features : 0 dependencies, only 125 lines long!.
1.3.27 - features : removed path resolving and added boolean type.
1.3.29 - fixed console color output.
the logger will automatically stringify everything for you except functions and multi-lines.
First, install the package using npm:`npm install adv-logger --save`
Then, require it and use it like so:
`const log = require('adv-logger');`
![alt text](https://i.imgsafe.org/19a450d1ac.png)
### Output
logger will return one the next types for easier debugging:
``` ['number','string','object','array','multi-line','date','null','undefined','boolean','error']```
![alt text](https://i.imgsafe.org/19a628f0fa.png)