Classes Reference
Complete reference for all Sherlock AI classes.
SherlockAI
Advanced logging management class.
Constructor:
Methods:
setup(format_type="log")
Set up logging configuration.
reconfigure(new_config)
Change configuration without restart.
cleanup()
Clean up handlers and resources.
get_stats()
Get current logging statistics.
CodeAnalyzer
Code analysis utilities.
Constructor:
Methods:
detect_hardcoded_values(source_code)
Detect hardcoded values in source code.
suggest_constant_name(value, value_type, context)
Suggest constant name for a value.
MongoManager
MongoDB storage management.
Constructor:
Methods:
save(data)
Save data to MongoDB.
Properties:
enabled
Check if MongoDB is configured.
ApiClient
HTTP client for data ingestion.
Constructor:
Methods:
post_error_insights(data)
Send error insights to backend.
post_performance_insights(data)
Send performance insights to backend.
ResourceMonitor
Resource monitoring utilities.
Static Methods:
capture_resources()
Capture current resource snapshot.
capture_memory()
Capture memory snapshot.
format_bytes(bytes_val)
Format bytes in human-readable format.