Installation¶
Prerequisites¶
- Python: 3.10 or higher
- Operating System: Windows, macOS, or Linux
- pip: Latest version recommended
Install from PyPI¶
The easiest way to install Logly is from PyPI:
Verify Installation¶
After installation, verify that Logly is working correctly:
from logly import logger
# NEW in v0.1.5: No configuration needed!
logger.info("Logly installed successfully!") # ✅ Works immediately
logger.complete()
You should see:
Why it works immediately: - Logger is auto-configured on import (since v0.1.5) - Default settings: console=True
, auto_sink=True
- No need to call configure()
before logging - File sinks are NEVER automatic - add with logger.add("file.log")
Version Information¶
Check the installed version:
Output:
Platform-Specific Installation¶
Windows¶
macOS¶
Linux¶
Install from Source¶
For developers or users who want the latest development version:
Prerequisites for Building¶
- Python: 3.10+
- Rust: 1.70+ (Install Rust)
- maturin: Python package for building Rust extensions
Build Steps¶
Docker Installation¶
For containerized environments:
Dockerfile Example¶
FROM python:3.12-slim
# Install logly
RUN pip install --no-cache-dir logly
# Copy application
COPY . /app
WORKDIR /app
# Run application
CMD ["python", "app.py"]
Docker Compose¶
version: '3.8'
services:
app:
image: python:3.12-slim
volumes:
- ./:/app
- ./logs:/app/logs
working_dir: /app
command: >
sh -c "pip install logly && python app.py"
Virtual Environments¶
It's recommended to use virtual environments:
Troubleshooting¶
Import Error¶
If you encounter import errors:
Output:
Traceback (most recent call last):
File "test.py", line 1, in <module>
ImportError: cannot import name 'logger' from 'logly'
Solution: Ensure you're using Python 3.10+:
Output:
Python 3.12.0
Collecting logly
Downloading logly-0.1.2.tar.gz (15 kB)
Successfully installed logly-0.1.2
Build Errors (Source Installation)¶
If building from source fails:
-
Install Rust toolchain:
-
Update maturin:
-
Clean and rebuild:
Permission Errors¶
On Unix systems, if you get permission errors:
Upgrade¶
To upgrade to the latest version:
Check release notes: Changelog
Uninstall¶
To remove Logly:
System Requirements¶
Component | Minimum | Recommended |
---|---|---|
Python | 3.10 | 3.11+ |
RAM | 50 MB | 100 MB+ |
Disk | 5 MB | 10 MB+ |
CPU | Any | Multi-core for async |
Next Steps¶
Now that Logly is installed, check out the Quick Start Guide to start logging!