Metadata-Version: 2.1
Name: plain-logger
Version: 0.1.4
Summary: An easy to use helper pip package to help you log details at any point in code.
Home-page: https://github.com/prapanw/plain_logger
Author: Prakhar Panwaria
Author-email: prapanw@microsoft.com
License: MIT
Download-URL: https://github.com/prapanw/plain_logger
Keywords: logger logging loginfo logwarning logerror logdebug
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# plain_logger - Make logging simple and easy

An easy to use helper pip package to help you log details at any point in code.

## Assumptions

+ Assuming python is installed on your system.


## Installation

Install `plain_logger` on your system using : 

```
pip install plain_logger
```

## Usage

### LogInfo
Logs data with 'INFO' tag.

### LogWarn
Logs data with 'WARN' tag.

### LogError
Logs data with 'ERROR' tag.

### LogDebug
Logs data with 'DEBUG' tag.

### LogMessage
Logs data with a custom tag.

## Example
``` 
from Logger.Logger import Logger

def foo():
    try:
        fname = "John"
        lname = "Doe"
        Logger.LogInfo ("Name = {} {}".format(fname, lname))

        x = 0
        Logger.LogDebug("x = {}".format(x))

        y = -1
        Logger.LogWarn("Something may be wrong.")

        raise ValueError('A very specific bad thing happened.')

    except Exception as e:
        Logger.LogError("Exception occurred: {}".format(str(e)))

foo()
```

Output:
```
[2019-02-09 22:31:55] INFO : Test
[2019-02-09 22:31:55] WARN : Test
[2019-02-09 22:31:55] ERROR : Test
[2019-02-09 22:31:55] DEBUG : Test
[2019-02-09 22:31:55] DEBUG : Test, TAG
[2019-02-09 22:31:55] INFO : Name = John Doe
[2019-02-09 22:31:55] DEBUG : x = 0
[2019-02-09 22:31:55] WARN : Something may be wrong.
[2019-02-09 22:31:55] ERROR : Exception occurred: A very specific bad thing happened.
```



