-
Notifications
You must be signed in to change notification settings - Fork 13
feat: redirect log #223
feat: redirect log #223
Conversation
base/cortex-common/enginei.h
Outdated
| return false; | ||
| } | ||
| virtual void SetFileLogger() = 0; | ||
| virtual void SetFileLogger(int max_log_lines, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this function to the end of the class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove it
src/llama_engine.h
Outdated
| constexpr char log_base_name[] = "logs/cortex"; | ||
| constexpr char log_folder[] = "logs"; | ||
| constexpr size_t max_log_file_size = 20000000; // ~20mb | ||
| constexpr size_t max_log_file_size = 20000000; // ~20mb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: is this settable via .cortexrc? (and is it per-engine specific?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New logger don't need that config, I'll remove max_log_file_size
|
@nguyenhoangthuan99 I've approved this PR to unblock you. However, can I verify my understanding of this PR, and the separation of concerns between the main
I have the following questions:
|
|
Fix janhq/cortex.cpp#1054
Summary changed:
file_loggerimplementation ascortex-cppdidSetFileLogger(int max_log_lines, const std::string& log_path)so that when server incortex-cppload engines, it can enable file logger by calling this function