Metadata-Version: 2.4
Name: loggissimo
Version: 2.0.8
Summary: Awesome and simple logger
Author-email: MikleSedrakyan <scriptdefender@yandex.ru>, AfanasevAndrey <scriptdefender@yandex.ru>
License: MIT License
        
        Copyright (c) 2024 Mihail Sedrakyan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/Sw1mmeR/loggissimo/tree/main
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorcall>=0.2.1
Provides-Extra: testing
Requires-Dist: pytest==7.4.0; extra == "testing"
Dynamic: license-file

![Logo](https://github.com/Sw1mmeR/loggissimo/blob/main/assets/logo.png)

# loggissimo

Awesome and simple logger!

## Authors

- [@MikleSedrakyan](https://github.com/Sw1mmeR)
- [@AndreyAfanasiev](https://github.com/AfanasevAndrey)

## Usage/Examples

Use default logger from package.
```python
from loggissimo import logger

logger.level = "TRACE"

logger.info("info")
logger.successs("success")
logger.warning("warning")
logger.error("error")
logger.critical("critical")

logger.debug("debug")
logger.trace("trace")
logger.destructor("destructor")
```

Create instance of logger with own format.
```python
# Default format string - "format", "$name@ $time | $level | $stack: $text"

logger = Logger("my_logger", "$name | $time | $text")
logger.info("my own logger")
```

Get created instance by name.
```
log = Logger("my_logger")
my_log = Logger("my_logger")

log is my_log # True
```

Override default colors and styles.
```python
logger = Logger(
        "my_logger",
        format="<font=cyan>$name | <style=bold bg=1,2,3 font=255,0,0>$time | <font=yellow bg=red>$text",
    )
logger.info("my own logger")
```

Add output streams.
```python
logger.add("my_logger.log")
# or
file = open("my_logger.log", "w+")
logger.add(file)
```

Disable message from module.
```python
# module/__init__.py
logger.disable()

# module/engine.py
def do_somthing():
    logger.info("I'm in module function")

# main.py
do_somthing() # The output is empty

logger.enable("module")
do_somthing()
# @ 2024-05-31 16:23:43 | INFO     | __main__:main:27: I'm in module funtcion
```
