Metadata-Version: 2.1
Name: maskerlogger
Version: 0.0.1
Summary: 
Author: Tamar Galer
Author-email: tamar@ox.security
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pyahocorasick (>=2.1.0,<3.0.0)
Description-Content-Type: text/markdown

![MaskerLoggerTitle](https://github.com/oxsecurity/MaskerLogger/assets/140309297/ae8ec8a7-9ec8-42f6-9640-6f9cd91e986e)

# Masker Logger

The Best Logger Formatter to prevent leaks in you python logs!

## Getting started

This formatter is based on the common `logging.Formatter` module.  
For each record, before the log is printed (to any source - file/stdout/etc),  
The formatter will prevent you from leaking sensetive data.

### Install the library

```
pip install maskerlogger
```

### Basic Usage

 Like any formatter - just init your logger handler with the MaskerLogger formatter.  
 ```
 from maskerlogger import MaskerFormatter
 logger = logging.getLogger('logger')
 logger.setLevel(logging.DEBUG)
 handler = logging.StreamHandler()
 handler.setFormatter(
     MaskerFormatter("%(asctime)s %(name)s %(levelname)s %(message)s"))
 logger.addHandler(handler)
 ```
## The Config File
Here all the magic happen!
We based our tool on the great Gitleaks tool, and we are using their default config.  
Default config can be found [here](https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml)


Good luck!


##### Brought to you by [OX Security](https://www.ox.security/)


