Revert "refactor: Update logging configuration to use asyncio logger and remove aiohttp access logger references"

This reverts commit 804808da4a.
This commit is contained in:
Will Miao
2025-07-23 22:23:48 +08:00
parent 804808da4a
commit 4d38add291
3 changed files with 31 additions and 5 deletions

View File

@@ -103,6 +103,9 @@ logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("lora-manager-standalone")
# Configure aiohttp access logger to be less verbose
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
# Now we can import the global config from our local modules
from py.config import config
@@ -121,7 +124,7 @@ class StandaloneServer:
async def _configure_access_logger(self, app):
"""Configure access logger to reduce verbosity"""
logging.getLogger("asyncio").setLevel(logging.WARNING)
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
# If using aiohttp>=3.8.0, configure access logger through app directly
if hasattr(app, 'access_logger'):
@@ -216,6 +219,9 @@ class StandaloneLoraManager(LoraManager):
# Store app in a global-like location for compatibility
sys.modules['server'].PromptServer.instance = server_instance
# Configure aiohttp access logger to be less verbose
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
added_targets = set() # Track already added target paths
# Add static routes for each lora root
@@ -365,8 +371,8 @@ async def main():
# Set log level
logging.getLogger().setLevel(getattr(logging, args.log_level))
# Explicitly configure asyncio logger regardless of selected log level
logging.getLogger("asyncio").setLevel(logging.WARNING)
# Explicitly configure aiohttp access logger regardless of selected log level
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
# Create the server instance
server = StandaloneServer()