html_logger
HTML Logger for Langroid Task System.
This module provides an HTML logger that creates self-contained HTML files with collapsible log entries for better visualization of agent interactions.
HTMLLogger(filename, log_dir='logs', model_info='', append=False)
¶
Logger that outputs task logs as interactive HTML files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
str
|
Base name for the log file (without extension) |
required |
log_dir
|
str
|
Directory to store log files |
'logs'
|
model_info
|
str
|
Information about the model being used |
''
|
append
|
bool
|
Whether to append to existing file |
False
|
Source code in langroid/utils/html_logger.py
log(fields)
¶
Log a message entry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fields
|
BaseModel
|
ChatDocLoggerFields containing all log information |
required |
Source code in langroid/utils/html_logger.py
close()
¶
Close the HTML file with footer.