Metadata-Version: 2.4
Name: logwatchdog
Version: 1.0.2
Summary: Comprehensive Windows log monitoring and management solution
Home-page: https://github.com/pandiyarajk/logwatchdog
Download-URL: https://github.com/pandiyarajk/logwatchdog/releases
Author: Pandiyaraj Karuppasamy
Author-email: pandiyarajk@live.com
License: MIT
Project-URL: Bug Reports, https://github.com/pandiyarajk/logwatchdog/issues
Project-URL: Source, https://github.com/pandiyarajk/logwatchdog
Project-URL: Documentation, https://github.com/pandiyarajk/logwatchdog/blob/main/README.md
Project-URL: Changelog, https://github.com/pandiyarajk/logwatchdog/blob/main/CHANGELOG.md
Project-URL: Download, https://github.com/pandiyarajk/logwatchdog/releases
Keywords: log,monitoring,windows,notifications,alerts,system-administration,security,auditing,real-time,watchdog,monitoring-tool,log-analysis,event-logging,system-monitoring
Platform: win32
Platform: win_amd64
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Networking :: Monitoring
Classifier: Topic :: Utilities
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: plyer>=2.0.0
Requires-Dist: python-dotenv>=0.19.0
Requires-Dist: psutil>=5.8.0
Requires-Dist: watchdog>=2.1.0
Requires-Dist: email-validator>=1.1.3
Requires-Dist: pyinstaller>=5.0.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: pytest-cov>=2.10.0; extra == "dev"
Requires-Dist: black>=21.0.0; extra == "dev"
Requires-Dist: flake8>=3.8.0; extra == "dev"
Requires-Dist: mypy>=0.800; extra == "dev"
Requires-Dist: pre-commit>=2.15.0; extra == "dev"
Requires-Dist: tox>=3.20.0; extra == "dev"
Requires-Dist: sphinx>=4.0.0; extra == "dev"
Requires-Dist: sphinx-rtd-theme>=0.5.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=6.0.0; extra == "test"
Requires-Dist: pytest-cov>=2.10.0; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=4.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=0.5.0; extra == "docs"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# LogWatchdog

[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://img.shields.io/pypi/v/logwatchdog.svg)](https://pypi.org/project/logwatchdog/)
[![GitHub](https://img.shields.io/badge/github-logwatchdog-green.svg)](https://github.com/pandiyarajk/logwatchdog)
[![Build Log Watchdog Executable](https://github.com/Pandiyarajk/logwatchdog/actions/workflows/build-exe.yml/badge.svg)](https://github.com/Pandiyarajk/logwatchdog/actions/workflows/build-exe.yml)
[![Windows](https://img.shields.io/badge/platform-Windows-blue.svg)](https://www.microsoft.com/windows)
[![PyInstaller](https://img.shields.io/badge/build-PyInstaller-green.svg)](https://pyinstaller.org/)


**LogWatchdog** is a powerful real-time log monitoring solution that detects exceptions and errors in log files, providing instant alerts through multiple notification channels.

## 🚀 Features

- **Real-time Log Monitoring**: Monitor single files, multiple files, or entire folders
- **Smart Exception Detection**: Configurable keywords for error detection
- **Multi-channel Notifications**: 
  - Custom flash popups (executables)
  - System tray notifications (script mode)
  - Email alerts with batch processing
  - Console output with detailed logging
- **Auto-configuration**: Creates default config files automatically
- **Standalone Executable**: No Python installation required on target systems
- **Batch Email Processing**: Groups multiple errors from same file into single email
- **File Discovery**: Automatic detection of new log files
- **Windows Optimized**: Designed specifically for Windows 10/11 systems

## 📋 Requirements

- **Python 3.7+**
- **Windows 10/11** (primary target)

## 🛠️ Installation

### Option 1: Standalone Executable (Recommended)

1. **Download** the latest `LogWatchdog.exe` from releases
2. **Run** the executable - it will create default configuration automatically
3. **Configure** your settings in the generated `log_config.ini` file

### Option 2: From Source

```bash
git clone https://github.com/pandiyarajk/logwatchdog.git
cd logwatchdog
pip install -r requirements.txt
```

### Option 3: Build Your Own Executable

```bash
# Install dependencies
pip install -r requirements.txt

# Build executable
python build_exe.py

# Or use the simple batch file
build.bat
```

## 🚀 Quick Start

### 1. Run the Application

**For Executable:**
```bash
# Just run the executable - it creates config automatically
LogWatchdog.exe
```

**For Script:**
```bash
python -m logwatchdog.main
```

### 2. Auto-Generated Configuration

The application automatically creates `log_config.ini` with sensible defaults:

```ini
# LogWatchdog Configuration File
# =============================
# This file was automatically created by LogWatchdog.
# Modify the values below to customize your monitoring setup.

[monitoring]
monitor_mode = folder
log_folder_path = C:\path\to\execution\directory\logs
log_file_extensions = *.log,*.txt,*.evtx
file_discovery_interval = 30
empty_monitor_delay = 10

[notifications]
email_enabled = false
smtp_server = smtp.gmail.com
smtp_port = 587
receiver_group = admin@company.com
system_tray_notifications = true
batch_email_enabled = true

[alerts]
exception_keywords = Exception,Error,Failure,Fail,Fatal,Issue,Crash,Close,Cannot,Wrong,unsupported,not found,retry,terminated,disconnected
```

### 3. Email Setup (Optional)

Create `.env` file for email notifications:

```bash
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
```

**Security Note**: Never commit the `.env` file to version control.

## 📁 Monitoring Modes

- **Single File**: Monitor one specific log file
- **Multiple Files**: Monitor multiple specific log files simultaneously  
- **Folder**: Monitor all log files in a folder with automatic file detection

## 🔧 Configuration

### Main Settings (`log_config.ini`)

- **Monitoring**: Mode, file paths, discovery intervals
- **Notifications**: Email settings, batch processing, system alerts
- **Alerts**: Exception keywords and detection rules

### Email Credentials (`.env`)

- `EMAIL_USER`: Your email address
- `EMAIL_PASSWORD`: Your email password or app password

## 🎯 Key Features Explained

### Smart Notifications

**For Executables:**
- **Flash Popup**: Custom red popup that auto-closes after 3 seconds
- **Taskbar Flashing**: Console window flashes 3 times
- **System Sound**: Windows beep plays with alerts
- **Console Output**: Detailed logging information

**For Scripts:**
- **System Tray**: Native Windows toast notifications
- **Fallback Support**: Graceful degradation if notifications fail

### Batch Email Processing

- **Groups Errors**: Multiple errors from same file = single email
- **Rich Content**: Error count, timestamps, detailed information
- **Configurable**: Can be disabled via `batch_email_enabled = false`

### Auto-Configuration

- **Creates Config**: Automatically generates `log_config.ini` if missing
- **Sensible Defaults**: Works out-of-the-box with minimal setup
- **Path Resolution**: Smart detection of execution directory vs script directory

## 🛠️ Build Scripts

### `build_exe.py` - Advanced Build Script
- **Dependency checking** with proper package mapping
- **Clean build artifacts** before building
- **Hidden imports** for all modules
- **Data file inclusion** (config files, README, etc.)
- **Debug mode** for troubleshooting
- **Installer script generation**

### `build.bat` - Simple Windows Batch File
- **Automatic dependency installation**
- **User-friendly interface**
- **Error handling**

## 📚 Documentation

- **User Guide**: See the code comments and configuration examples
- **Issues**: [GitHub Issues](https://github.com/pandiyarajk/logwatchdog/issues)
- **Support**: pandiyarajk@live.com

## 🤝 Contributing

We welcome contributions! Please see [CONTRIBUTING.md](https://github.com/pandiyarajk/logwatchdog/blob/main/CONTRIBUTING.md) for details.

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/pandiyarajk/logwatchdog/blob/main/LICENSE) file for details.

## 🔄 Changelog

See [CHANGELOG.md](https://github.com/pandiyarajk/logwatchdog/blob/main/CHANGELOG.md) for version history.

---

**Made with ❤️ by [Pandiyaraj Karuppasamy](https://github.com/pandiyarajk)**

*LogWatchdog - Your Windows Log Monitoring Companion*
