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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.log
.direnv
.envrc

Expand All @@ -14,6 +13,9 @@ __pycache__/
# C extensions
*.so

# Logs directory
logs/

# Distribution / packaging
.Python
build/
Expand Down
1 change: 0 additions & 1 deletion logs/ABOUT

This file was deleted.

4 changes: 3 additions & 1 deletion src/seclab_taskflow_agent/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@

# only model output or help message should go to stdout, everything else goes to log
logging.getLogger('').setLevel(logging.NOTSET)
log_dir = pathlib.Path("logs")
log_dir.mkdir(parents=True, exist_ok=True)
log_file_handler = RotatingFileHandler(
'logs/task_agent.log',
log_dir.joinpath('task_agent.log'),
maxBytes=1024*1024*10,
backupCount=10)
log_file_handler.setLevel(os.getenv('TASK_AGENT_LOGLEVEL', default='DEBUG'))
Expand Down