Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toghrulmirzayev/logstyle
https://github.com/toghrulmirzayev/logstyle
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/toghrulmirzayev/logstyle
- Owner: ToghrulMirzayev
- License: mit
- Created: 2023-09-04T13:34:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-16T22:01:36.000Z (about 1 year ago)
- Last Synced: 2024-10-12T14:14:33.872Z (3 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logstyle
# Getting started
Logstyle was developed for simplified usage like in below examples:
* Create your own CustomLog instance
```
custom_logger = CustomLog("MyLogger")
```
* Now you can try it using different styles and colors like below:
* Box style logs:
```
custom_logger.box_log("This is a box log example.", CustomLog.COLOR_GREEN)
```
* Title style logs:
```
custom_logger.title_log("Title Log", "This is a title log example.", CustomLog.COLOR_BLUE)
```
* JSON style logs:
```
custom_logger.json_log("JSON Log", "This is a JSON log example.", {"key": "value"}, CustomLog.COLOR_AMBER)
```
* YAML style logs:
```
custom_logger.yaml_log("YAML Log", "This is a YAML log example.", {"key": "value"}, CustomLog.COLOR_RED)
```