Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 60 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,66 @@ What is VersaLog.py?
VersaLog is a powerful and flexible logging library for Python.
It supports everything from simple usage to advanced, highly customizable configurations to meet a wide range of needs.

## Feature

### Basic Logging

- Supports standard log levels:
- `INFO`, `ERROR`, `WARNING`, `DEBUG`, `CRITICAL`
- Colored output for better readability
- Symbol-based prefixes (e.g. `[+]`, `[-]`, `[!]`)

### Multiple Output Formats

**Easily switch between different log styles:**

- `simple` → `[+] message`
- `simple2` → `[TIME] [+] message`
- `detailed` → `[TIME][LEVEL] : message`
- `file` → `[FILE:LINE][LEVEL] message`

### Tag System

- Add custom tags to logs
- Supports multiple tags (e.g. `["API", "AUTH"]`)
- Optional default tags

### File & Line Tracking

- Display caller file name and line number
- Useful for debugging large projects

### Log File Saving

- Automatically save logs to files
- Output path: `./log/YYYY-MM-DD.log`
- Select which log levels to save

### Auto Cleanup

- Automatically deletes old log files (default: 7 days)
- Keeps your log directory clean

### Auto Cleanup

- Disable console output
- Useful for background services

### Exception Handling

- Automatically captures unhandled exceptions
- Logs them as `CRITICAL`

### Desktop Notifications

- Optional desktop alerts for errors and critical logs
- Uses `plyer.notification`

### Asynchronous Logging

- Non-blocking log processing using threads and queues
- Improves performance in high-load environments

## Support

Join our Discord server for support, questions, and community discussions:
Expand Down Expand Up @@ -54,12 +114,4 @@ logger = VersaLog(enum="detailed", tag="a", show_tag=True)

# two tag
logger = VersaLog(enum="detailed", tag=["a", "a"], show_tag=True)
``` |

## Log save

````

[2025-08-06 04:10:36][INFO] : ok

```
Loading