Skip to content

Commit 9c2b40c

Browse files
author
Tom Softreck
committed
update
1 parent 2cf9f1f commit 9c2b40c

File tree

11 files changed

+315
-122
lines changed

11 files changed

+315
-122
lines changed

BADGE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,18 @@ If you set up documentation hosting:
9797
### Minimal Badge Set (for new projects)
9898
```markdown
9999
[![PyPI version](https://badge.fury.io/py/loglama.svg)](https://badge.fury.io/py/loglama)
100-
[![Python versions](https://img.shields.io/pypi/pyversions/loglama.svg)](https://pypi.org/project/loglama/)
100+
[![Python versions](https://img.shields.io/pypi/pyversions/loglama.svg)](https://pypi.org/project/webtop/)
101101
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
102-
[![Build Status](https://github.com/py-lama/loglama/workflows/CI/badge.svg)](https://github.com/py-lama/loglama/actions)
102+
[![Build Status](https://github.com/py-lama/webtop/workflows/CI/badge.svg)](https://github.com/py-lama/webtop/actions)
103103
```
104104

105105
### Extended Badge Set (for mature projects)
106106
Add these badges as your project grows:
107107
```markdown
108-
[![Documentation Status](https://readthedocs.org/projects/loglama/badge/?version=latest)](https://loglama.readthedocs.io/en/latest/)
109-
[![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/py-lama/loglama/maintainability)
110-
[![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/py-lama/loglama/test_coverage)
111-
[![PyPI - Downloads](https://img.shields.io/pypi/dm/loglama)](https://pypi.org/project/loglama/)
108+
[![Documentation Status](https://readthedocs.org/projects/webtop/badge/?version=latest)](https://loglama.readthedocs.io/en/latest/)
109+
[![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/py-lama/webtop/maintainability)
110+
[![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/py-lama/webtop/test_coverage)
111+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/loglama)](https://pypi.org/project/webtop/)
112112
```
113113

114114
## Logo Variations

CONTRIBUTING.md

Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -93,36 +93,6 @@ LOGLAMA_WEB_HOST=127.0.0.1
9393
LOGLAMA_WEB_DEBUG=true
9494
```
9595

96-
## Project Structure
97-
98-
```
99-
loglama/
100-
├── loglama/ # Main package
101-
│ ├── core/ # Core logging functionality
102-
│ ├── cli/ # Command-line interface
103-
│ ├── api/ # REST API server
104-
│ ├── web/ # Web interface
105-
│ └── utils/ # Utility functions
106-
├── tests/ # Test suite
107-
│ ├── unit/ # Unit tests
108-
│ ├── integration/ # Integration tests
109-
│ └── ansible/ # Ansible playbooks for testing
110-
├── examples/ # Example applications
111-
├── scripts/ # Utility scripts
112-
├── docs/ # Documentation
113-
├── Makefile # Development commands
114-
├── pyproject.toml # Project configuration
115-
└── README.md # Project overview
116-
```
117-
118-
### Key Components
119-
120-
- **`loglama/core/`**: Core logging functionality, logger configuration, and context management
121-
- **`loglama/cli/`**: Command-line interface for interacting with logs
122-
- **`loglama/api/`**: RESTful API for programmatic access to logs
123-
- **`loglama/web/`**: Web interface for log visualization and management
124-
- **`loglama/utils/`**: Common utilities and helper functions
125-
12696
## Development Workflow
12797

12898
### 1. Choose an Issue
@@ -190,44 +160,6 @@ LogLama follows PEP 8 with some specific conventions:
190160
- **flake8**: Linting and style checking
191161
- **mypy**: Static type checking
192162

193-
### Example Code Style
194-
195-
```python
196-
from typing import Optional, Dict, Any
197-
import logging
198-
from loglama.core.context import LogContext
199-
200-
201-
class ExampleLogger:
202-
"""Example logger class demonstrating LogLama conventions.
203-
204-
Args:
205-
name: The logger name, used to identify the logger instance
206-
level: The logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
207-
console: Whether to enable console output
208-
file: Whether to enable file output
209-
database: Whether to enable database logging
210-
**kwargs: Additional configuration options
211-
212-
Returns:
213-
Configured logger instance
214-
215-
Raises:
216-
ValueError: If an invalid logging level is provided
217-
IOError: If file logging is enabled but the file cannot be created
218-
219-
Example:
220-
>>> logger = configure_logging(
221-
... name="my_app",
222-
... level="DEBUG",
223-
... console=True,
224-
... file=True,
225-
... file_path="/var/log/my_app.log"
226-
... )
227-
>>> logger.info("Application started")
228-
"""
229-
```
230-
231163
## Submitting Changes
232164

233165
### Pull Request Process
@@ -439,7 +371,7 @@ make run-cli
439371
#### Adding a New CLI Command
440372

441373
```python
442-
# In loglama/cli/commands/new_command.py
374+
# In webtop/cli/commands/new_command.py
443375
import click
444376
from loglama.core.logger import get_logger
445377

@@ -456,7 +388,7 @@ def new_command(param: str) -> None:
456388
#### Adding a New API Endpoint
457389

458390
```python
459-
# In loglama/api/routes/new_route.py
391+
# In webtop/api/routes/new_route.py
460392
from flask import Blueprint, request, jsonify
461393
from loglama.core.logger import get_logger
462394

@@ -533,7 +465,7 @@ make view-logs # Start web interface
533465
### Example 1: Adding a New Log Filter
534466

535467
```python
536-
# Add to loglama/core/filters.py
468+
# Add to webtop/core/filters.py
537469
class DateRangeFilter:
538470
"""Filter logs by date range."""
539471

@@ -550,7 +482,7 @@ class DateRangeFilter:
550482
### Example 2: Adding a New Output Format
551483

552484
```python
553-
# Add to loglama/core/formatters.py
485+
# Add to webtop/core/formatters.py
554486
class XMLFormatter:
555487
"""Format logs as XML."""
556488

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ test: test-unit test-integration
3737
@echo "All tests completed."
3838

3939
# Run unit tests
40+
# test-unit: venv
41+
# @echo "Running unit tests..."
42+
# @$(VENV_ACTIVATE) && pytest tests/unit/ -v
43+
4044
test-unit: venv
4145
@echo "Running unit tests..."
42-
@$(VENV_ACTIVATE) && pytest tests/unit/ -v
46+
@$(VENV_ACTIVATE) && pytest tests/ -v
4347

4448
# Run integration tests
4549
test-integration: venv
@@ -54,14 +58,14 @@ test-ansible: venv
5458
# Run linting checks
5559
lint: venv
5660
@echo "Running linting checks..."
57-
@$(VENV_ACTIVATE) && flake8 loglama/
58-
@$(VENV_ACTIVATE) && mypy loglama/
61+
@$(VENV_ACTIVATE) && flake8 webtop/
62+
@$(VENV_ACTIVATE) && mypy webtop/
5963

6064
# Format code
6165
format: venv
6266
@echo "Formatting code..."
63-
@$(VENV_ACTIVATE) && black loglama/
64-
@$(VENV_ACTIVATE) && isort loglama/
67+
@$(VENV_ACTIVATE) && black webtop/
68+
@$(VENV_ACTIVATE) && isort webtop/
6569

6670
# Build package with Poetry
6771
build: venv

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# webtop
1+
# WebTop 🖥️
2+
23
webtop python package to start web top version in browser, [kill] like a pro!
34

4-
# WebTop 🖥️
55

66
A modern, web-based system monitor inspired by htop with advanced file browsing, process transparency layers, and miniature file previews. Monitor your system processes through a sleek terminal-style web interface with real-time updates and comprehensive process management capabilities.
77

8-
![WebTop Screenshot](https://via.placeholder.com/800x400/1a1a1a/00ff00?text=WebTop+System+Monitor+v2.0)
8+
![webtop-logo.svg](webtop-logo.svg)
99

1010
## ✨ Features
1111

docs/development.md

Whitespace-only changes.

docs/installation.md

Whitespace-only changes.

docs/usage.md

Whitespace-only changes.

env.example

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +0,0 @@
1-
# LogLama Environment Configuration Example
2-
# Copy this file to .env and modify as needed
3-
4-
# Logging Configuration
5-
LOGLAMA_LOG_LEVEL=INFO # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
6-
LOGLAMA_LOG_DIR=./logs # Directory to store log files
7-
LOGLAMA_LOG_FORMAT="%(asctime)s - %(levelname)s - %(name)s - %(message)s"
8-
LOGLAMA_CONSOLE_ENABLED=true # Enable console logging
9-
LOGLAMA_FILE_ENABLED=true # Enable file logging
10-
LOGLAMA_JSON_FORMAT=false # Use JSON format for logs
11-
12-
# Database Configuration
13-
LOGLAMA_DB_ENABLED=true # Enable database logging
14-
LOGLAMA_DB_PATH=./db/loglama.db # Path to SQLite database
15-
LOGLAMA_DB_TABLE=log_records # Table name for log records
16-
17-
# API Server Configuration
18-
LOGLAMA_API_HOST=127.0.0.1 # API server host
19-
LOGLAMA_API_PORT=5000 # API server port
20-
LOGLAMA_API_DEBUG=false # Enable debug mode for API server
21-
LOGLAMA_API_SECRET_KEY=change_this_to_a_secure_secret_key # Secret key for API server
22-
23-
# Web Interface Configuration
24-
LOGLAMA_WEB_HOST=127.0.0.1 # Web interface host
25-
LOGLAMA_WEB_PORT=5001 # Web interface port
26-
LOGLAMA_WEB_DEBUG=false # Enable debug mode for web interface
27-
LOGLAMA_WEB_SECRET_KEY=change_this_to_a_secure_secret_key # Secret key for web interface
28-
29-
# CLI Configuration
30-
LOGLAMA_CLI_COLORS=true # Enable colored output in CLI
31-
LOGLAMA_CLI_VERBOSE=false # Enable verbose output in CLI
32-
33-
# Advanced Configuration
34-
LOGLAMA_STRUCTURED_LOGGING=false # Use structured logging with structlog
35-
LOGLAMA_MAX_LOG_SIZE=10485760 # Maximum log file size in bytes (10 MB)
36-
LOGLAMA_BACKUP_COUNT=5 # Number of backup log files to keep

0 commit comments

Comments
 (0)