Metadata-Version: 2.1
Name: whylog
Version: 0.1
Summary: Prints out a log message to terminal in color
Home-page: https://github.com/iamlrk/whylog
Author-email: <lepakshiramkiran@hotmail.com>
Keywords: python,logging,log,print
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# whylog

This is an library to print color-coded log messages to the terminal. It prints in the following format.

`TIME [LOG TYPE] (file names) > (path of the call|line no): Message.`

## Log Levels

Print or Save to a log file.
| Log Level | Log Type      | Print Color | Background Color |
| ---------:| ------------- | ----------- | ---------------- |
|         0 | Emergency     | Black       | Red              |
|         1 | Alert         | Black       | Yellow           |
|         2 | Critical      | Black       | Magenta          |
|         3 | Error         | Red         | No Color         |
|         4 | Warning       | Yellow      | No Color         |
|         5 | Notice        | White       | Blue             |
|         6 | Informational | White       | No Color         |
|         7 | Debug         | Cyan        | No Color         |
|         8 | None          | NA          | NA               |

## Usage

### Code

```python
from whylog import Log

def main():
    test()

def test():
    log = Log(loglevel=8)
    log.emergency('Test emergency Print by importing')
    log.alert('Test alert Print by importing')
    log.critical('Test crtical Print by importing')
    log.error('Test error Print by importing')
    log.warning('Test warning Print by importing')
    log.notice('Test notice Print by importing')
    log.debug('Test Debug Print by importing')
    log.info('Test info Print by importing')

if __name__ == '__main__':
    main()
```

### Output

![Output](images/output.png)
