Skip to content

Commit

Permalink
fix: rm xtra log location
Browse files Browse the repository at this point in the history
  • Loading branch information
justjokiing committed Jan 10, 2025
1 parent f5926ea commit e8cb5c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "kshift"
version = "1.0.0"
version = "1.0.1"
authors = [
{ name="Seth Mackert", email="[email protected]" },
]
Expand Down
17 changes: 8 additions & 9 deletions src/kshift/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@
cache_dir = log_file.parent
cache_dir.mkdir(parents=True, exist_ok=True)

logging.basicConfig(filename=log_file,
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
datefmt="%Y-%m-%d %H:%M:%S")

handler = RotatingFileHandler("theme_changes.log",
maxBytes=1 * 1024 * 1024,
backupCount=1)
logging.getLogger().addHandler(handler)
# Setup RotatingFileHandler for the same file
handler = RotatingFileHandler(log_file, maxBytes=1 * 1024 * 1024, backupCount=1)
formatter = logging.Formatter(
"%(asctime)s - %(levelname)s - %(message)s", datefmt="%Y-%m-%d %H:%M:%S"
)
handler.setFormatter(formatter)

# Configure logging
logging.basicConfig(level=logging.INFO, handlers=[handler])

def log_theme_change(theme_name):
"""
Expand Down

0 comments on commit e8cb5c1

Please sign in to comment.