log_error_once() — langchain Function Reference
Architecture documentation for the log_error_once() function in langchain.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2c07d5a6_0b43_cd17_8e75_6b8d83c1e656["log_error_once()"] 34ac5e02_6299_266f_403f_f48ad1969c05["langchain.py"] 2c07d5a6_0b43_cd17_8e75_6b8d83c1e656 -->|defined in| 34ac5e02_6299_266f_403f_f48ad1969c05 cf43defe_cb35_deb4_9782_55f973cdf6ca["_persist_run_single()"] cf43defe_cb35_deb4_9782_55f973cdf6ca -->|calls| 2c07d5a6_0b43_cd17_8e75_6b8d83c1e656 bce3427a_d6ea_f317_a362_d28206fa1696["_update_run_single()"] bce3427a_d6ea_f317_a362_d28206fa1696 -->|calls| 2c07d5a6_0b43_cd17_8e75_6b8d83c1e656 style 2c07d5a6_0b43_cd17_8e75_6b8d83c1e656 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/tracers/langchain.py lines 38–48
def log_error_once(method: str, exception: Exception) -> None:
"""Log an error once.
Args:
method: The method that raised the exception.
exception: The exception that was raised.
"""
if (method, type(exception)) in _LOGGED:
return
_LOGGED.add((method, type(exception)))
logger.error(exception)
Domain
Subdomains
Source
Frequently Asked Questions
What does log_error_once() do?
log_error_once() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/langchain.py.
Where is log_error_once() defined?
log_error_once() is defined in libs/core/langchain_core/tracers/langchain.py at line 38.
What calls log_error_once()?
log_error_once() is called by 2 function(s): _persist_run_single, _update_run_single.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free