Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion email_processor/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from email.utils import parseaddr

from email_processor import ConfigLoader
from email_processor import ConfigLoader, __version__
from email_processor.cli import CLIUI
from email_processor.cli.args import parse_arguments
from email_processor.cli.commands import config, imap, passwords, smtp, status
Expand Down Expand Up @@ -127,6 +127,10 @@ def main() -> int:
# Create UI instance with verbose/quiet flags
ui = CLIUI(verbose=args.verbose, quiet=args.quiet)

# Print version to console (unless quiet mode)
if not args.quiet:
ui.info(f"Email Processor v{__version__}")

# Handle subcommands
if not args.command:
# Default: run command (backward compatibility)
Expand Down
2 changes: 1 addition & 1 deletion email_processor/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version information for email_processor package."""

__version__ = "8.0.3"
__version__ = "8.0.4"
6 changes: 6 additions & 0 deletions email_processor/logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import structlog

from email_processor import __version__


def get_logger(uid: Optional[str] = None) -> structlog.BoundLogger:
"""
Expand Down Expand Up @@ -128,6 +130,10 @@ def setup_logging(log_config: dict[str, Any]) -> None:
except Exception as e:
print(f"Warning: Unexpected error setting up file logging: {e}", file=sys.stderr)

# Log version information after logging is set up
logger = get_logger()
logger.info("application_started", version=__version__)


class LoggingManager:
"""Logging manager class."""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages = {find = {}}

[project]
name = "email-processor"
version = "8.0.3"
version = "8.0.4"
description = "Email attachment processor with IMAP and SMTP support"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
Loading