Rename project: maxclaw → langcode

- Renamed all references from maxclaw to langcode across all files
- Renamed maxclaw.py → langcode.py
- Renamed completion scripts: maxclaw.bash/zsh → langcode.bash/zsh
- Updated Dockerfile, README, all Python files, HTML, JSON, YAML
- New Gitea repository: http://192.168.0.183:8085/truetype/langcode_agent.git
This commit is contained in:
truetype committed 2026-03-21 08:36:35 +01:00
1 parent 0612b290d5
commit eda22811ce
39 files changed
+231 -231

No files matched your search

+12 -12
View File
@@ -1,5 +1,5 @@
"""
Monitoring and logging for MaxClaw Agent
Monitoring and logging for LangCode Agent
"""
import os
import sys
@@ -14,18 +14,18 @@ from pathlib import Path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
class MaxClawLogger:
"""Custom logger for MaxClaw Agent"""
class LangCodeLogger:
"""Custom logger for LangCode Agent"""
def __init__(self, log_dir: Optional[str] = None):
"""
Initialize logger
Args:
log_dir: Directory for log files. If None, uses ~/.maxclaw/logs
log_dir: Directory for log files. If None, uses ~/.langcode/logs
"""
if log_dir is None:
self.log_dir = Path.home() / ".maxclaw" / "logs"
self.log_dir = Path.home() / ".langcode" / "logs"
else:
self.log_dir = Path(log_dir)
@@ -46,7 +46,7 @@ class MaxClawLogger:
)
# Create file handler
log_file = self.log_dir / f"maxclaw_{datetime.now().strftime('%Y%m%d')}.log"
log_file = self.log_dir / f"langcode_{datetime.now().strftime('%Y%m%d')}.log"
file_handler = logging.FileHandler(log_file)
file_handler.setLevel(logging.INFO)
file_handler.setFormatter(file_formatter)
@@ -63,10 +63,10 @@ class MaxClawLogger:
)
# Create specific loggers
self.agent_logger = logging.getLogger("maxclaw.agent")
self.config_logger = logging.getLogger("maxclaw.config")
self.api_logger = logging.getLogger("maxclaw.api")
self.tools_logger = logging.getLogger("maxclaw.tools")
self.agent_logger = logging.getLogger("langcode.agent")
self.config_logger = logging.getLogger("langcode.config")
self.api_logger = logging.getLogger("langcode.api")
self.tools_logger = logging.getLogger("langcode.tools")
print(f"✅ Logging initialized. Logs will be saved to: {self.log_dir}")
@@ -187,7 +187,7 @@ class SystemMonitor:
# Global instances
logger = MaxClawLogger()
logger = LangCodeLogger()
system_monitor = SystemMonitor()
@@ -241,7 +241,7 @@ except ImportError:
if __name__ == "__main__":
# Test logging
print("Testing MaxClaw logging system...")
print("Testing LangCode logging system...")
# Log some test messages
logger.log_agent_action("test_action", {"test": "data"})