Log to file #192
Answered
by
pthom
hephaestus9
asked this question in
Q&A
Log to file
#192
-
Is it possible to use the logger to log to a file in addition to the log window? |
Beta Was this translation helpful? Give feedback.
Answered by
pthom
Mar 22, 2024
Replies: 1 comment 1 reply
-
Hello, The API for logging is actually quite simple, and if you want to log to a file and/or stdout in addition to the log window, my advice is to use a logging library on top of HelloImGui's logging facility. A logging library such as spldlog in C++ or such as the logging module in python offers the possibility to log to different "sinks" (i.e. outputs). I asked ChatGPT for advices on this subject using these libraries, and its output might be a good starting point: https://chat.openai.com/share/fad96ee4-d9be-4cfc-b98e-803ecdd90a7b |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hephaestus9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
The API for logging is actually quite simple, and if you want to log to a file and/or stdout in addition to the log window, my advice is to use a logging library on top of HelloImGui's logging facility.
A logging library such as spldlog in C++ or such as the logging module in python offers the possibility to log to different "sinks" (i.e. outputs).
I asked ChatGPT for advices on this subject using these libraries, and its output might be a good starting point:
https://chat.openai.com/share/fad96ee4-d9be-4cfc-b98e-803ecdd90a7b