mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
* docs(docs): start implementing docs website * update video url * add autogenerated codebase docs for backend * precommit * update links * fix config and video * gh actions * rename * workdirs * path * path * fix doc1 * redo markdown * docs * change main folder name * simplify readme * add back architecture * Fix lint errors * lint * update poetry lock --------- Co-authored-by: Jim Su <jimsu@protonmail.com>
1.5 KiB
1.5 KiB
sidebar_label, title
| sidebar_label | title |
|---|---|
| logger | opendevin.logger |
get_console_handler
def get_console_handler()
Returns a console handler for logging.
get_file_handler
def get_file_handler()
Returns a file handler for logging.
log_uncaught_exceptions
def log_uncaught_exceptions(ex_cls, ex, tb)
Logs uncaught exceptions along with the traceback.
Arguments:
ex_clstype - The type of the exception.exException - The exception instance.tbtraceback - The traceback object.
Returns:
None
LlmFileHandler Objects
class LlmFileHandler(logging.FileHandler)
LLM prompt and response logging
__init__
def __init__(filename, mode='a', encoding='utf-8', delay=False)
Initializes an instance of LlmFileHandler.
Arguments:
filenamestr - The name of the log file.modestr, optional - The file mode. Defaults to 'a'.encodingstr, optional - The file encoding. Defaults to None.delaybool, optional - Whether to delay file opening. Defaults to False.
emit
def emit(record)
Emits a log record.
Arguments:
recordlogging.LogRecord - The log record to emit.
get_llm_prompt_file_handler
def get_llm_prompt_file_handler()
Returns a file handler for LLM prompt logging.
get_llm_response_file_handler
def get_llm_response_file_handler()
Returns a file handler for LLM response logging.