File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -172,12 +172,17 @@ Log::~Log()
172172 mOutStringStream .str ().c_str ());
173173 }
174174#else
175- // If it's an error or the --debug flag has been set, then print to the console as well.
175+ // For regular builds (non-RetroDECK) print to stderr when it's an error
176+ // or the reporting level is Debug. On RetroDECK we always write logs to
177+ // the terminal via stdout instead, to avoid duplicate messages (stderr+stdout).
178+ #if !defined(RETRODECK)
176179 if (mMessageLevel == LogError || sReportingLevel >= LogDebug)
177180 std::cerr << mOutStringStream .str ();
178181#endif
182+ #endif
179183#if defined(RETRODECK)
180- // Always write logs to the terminal as well when RetroDECK is defined
184+ // Write logs to the terminal (stdout) for RetroDECK builds. Avoid using
185+ // stderr here to prevent duplicate logging when reporting level is Debug.
181186 std::cout << mOutStringStream .str ();
182187#endif
183188}
You can’t perform that action at this time.
0 commit comments