Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/just-cameron/comind. Comind, the cognitive layer for the web. comind.stream/docs/getting-started
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455#!/usr/bin/env python3"""Script to apply non-timestamp logging configuration to all major modules.Run this script from the project root directory."""
import importlibimport loggingimport sysimport os
# Add the project root to the pathsys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Import our logging configurationfrom src.comind.logging_config import configure_root_logger_without_timestamp
# Configure the root logger without timestampsconfigure_root_logger_without_timestamp()
# Reset and reconfigure all existing loggers to remove timestampsfor name in logging.root.manager.loggerDict: logger = logging.getLogger(name) # Remove existing handlers for handler in logger.handlers[:]: logger.removeHandler(handler) # Force the logger to use handlers from the root logger logger.propagate = True
print(f"Reconfigured logger: {name}")
# Force reload modules that might have already configured loggingmodules_to_reload = [ 'src.jetstream_consumer', 'src.record_manager', 'src.session_reuse', 'src.structured_gen', 'src.comind.comind', 'src.bsky_utils', 'src.sphere_manager',]
for module_name in modules_to_reload: try: if module_name in sys.modules: importlib.reload(sys.modules[module_name]) print(f"Reloaded module: {module_name}") except (ImportError, KeyError) as e: print(f"Could not reload module {module_name}: {e}")
print("\nLogging has been reconfigured to remove timestamps.")print("All new log messages should now appear without timestamps.")print("Note: You may need to restart any existing processes for changes to take effect.")