Caching formatted result from a log call #107
-
I'm more than interested in using Quill for my project for the asynchronous formatting, but my application benefits from storing formatted log strings for display in an in-window Dear ImGui panel (not for my benefit, but that of the hypothetical user). Would there be a way to keep doing this - printing to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, It is possible to implement custom handlers and register them. Each logger can have multiple handlers attached. If you would like a single LOG_ macro call to do all the 3 things listed above you have 2 options:
I have pushed an example that is using option 2 here Keep in mind that the vector in the example above is written by a backend worker thread. If you are having a different thread reading the vector to render it to the gui then you will have to use a mutex on the vector. Let me know if you have any issues or any other questions |
Beta Was this translation helpful? Give feedback.
Hello,
It is possible to implement custom handlers and register them.
Each logger can have multiple handlers attached.
And each handler can also have its own custom format.
If you would like a single LOG_ macro call to do all the 3 things listed above you have 2 options:
handler
that does all handing inside (file/vector/console).I have pushed an example that is using option 2 here
Keep in mind that the vector in the example above is written by a backend worker thread. If you are having a different thread reading the vector to render it to the gui then you will have to use…