https://github.com/maheshwaghmare/pretty-js-logger
https://github.com/maheshwaghmare/pretty-js-logger
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/maheshwaghmare/pretty-js-logger
- Owner: maheshwaghmare
- Created: 2020-11-20T14:19:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-20T14:56:28.000Z (over 4 years ago)
- Last Synced: 2024-04-14T04:44:26.889Z (about 1 year ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pretty JS Logger
See pretty javascript logs in the console.
## Installation
```sh
npm i pretty-js-logger
```## Usage
### Example 1: Simple Log Messages
Below is the simple example which dispaly the log messages.
```js
import { log, info, success, error, warn } from 'pretty-js-logger';// Simple log with log message.
log('Simple log message.');info('Info log message');
success('Success log message');
error('Error log message');
warn('Warn log message');
```**Screenshot**

### Example 2: Log Message with Data
Below is the example with log message with log data.
```js
import { log, info, success, error, warn } from 'pretty-js-logger';const data = {
user: {
name: 'Mahesh M. Waghmare',
email: '[email protected]',
},
isLoggedIn: true,
};// Log message with log data.
log('Simple log message.', data );info('Info log message', data );
success('Success log message', data);
error('Error log message', data);
warn('Warn log message', data);
```**Screenshot**
