53 Commits

Author SHA1 Message Date
Luke Street 208a8c1f84 Add emscripten logvisorAbort 2022-08-03 18:11:46 -04:00
Phillip Stephens 6926b6a7c9 Always flush log file on close to prevent incomplete logs 2022-01-10 23:27:06 -08:00
Luke Street df3c283186 Update fmt to 8.0.0; drop support for wchar
Adds some boost-nowide headers to assist in
UTF-8/16 conversion for Windows API.
2021-06-25 15:04:38 -04:00
Phillip Stephens 274ad5ef07 Fix compiling on linux 2021-06-19 14:43:23 -07:00
Henrique Gemignani Passos Lima ed3714e55c Fix ConsoleLogger misusing Widen result lifetime 2021-06-19 13:40:17 +03:00
Minty-Meeo f23179e168 Wide char homogeneity
If wide char stdlib functions are used on a narrow char stream, they attempt to narrow the character or string.  If this fails, nothing is written to the stream and an error is indicated.  The {fmt} library, at its core, uses stdlib functions for printing to a stream.  However, it takes it a step further and acts upon errors while printing by throwing an exception.

If narrow char stdlib functions are used on a wide char stream, they throw an assertion.  The {fmt} library somehow does not throw an assertion, but whatever it ends up printing is garbage anyhow.

So from either end, it is generally a bad idea to mix narrow and wide character printing.  While you can get away with using wide char functions on a narrow char stream, the moment you start using anything other than English characters, it all falls apart.  Just as well, narrow chars on wide char streams do not work at all.  Despite this, I found many situations where wide char printing and narrow char printing was being used at the same time.  This PR makes character printing homogeneous to avoid the previously discussed issues.
2021-05-08 00:52:03 -05:00
Luke Street 0e3fe3e766 Integrate sentry-native crash reporting 2021-04-04 18:20:48 -04:00
Henrique Gemignani Passos Lima d4af1a1088 FileLogger: don't open/close file for each write 2021-04-03 19:42:44 +03:00
Phillip Stephens 8913e55e34 Fix crashing on windows when registering a file logger after a console logger, windows runtime bugs annoy the hell out of me >:( 2020-12-31 13:53:26 -08:00
Jack Andersen 7f63cabaea Fixes for recent windows SDK changes 2020-08-22 17:28:34 -10:00
Luke Street 41432143fd Only use lm service when LOGVISOR_NX_LM set 2020-05-05 00:14:41 -04:00
Jack Andersen 14ea54f8b5 Add lm service for switch build 2020-05-03 20:09:21 -10:00
Jack Andersen d62b4ce26e Update fmtlib 2020-04-11 12:44:21 -10:00
Jack Andersen f04a9777eb Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/logvisor 2019-09-30 21:21:21 -10:00
Jack Andersen 187c35f3c4 Ensure only one console logger is able to be registered 2019-09-30 21:20:45 -10:00
Lioncash 63cb911d09 logvisor: Mark logvisorAbort as [[noreturn]]
All variants of logvisorAbort do what they say in their name -- abort.
Given control isn't returned from this function, we can signify that
it's a noreturn function
2019-09-06 07:37:27 -04:00
Lioncash 2f3f06e5ca logvisor: Add missing override specifiers 2019-08-26 10:34:40 -04:00
Lioncash 94d1c558a0 logvisor: Use std::fputs/std::fputc where applicable
We can just use std::fputc when inserting a single character instead of
using std::fputs. Likewise, we can use std::fputs over std::fprintf when
no formatting specifiers are present.
2019-08-26 10:31:45 -04:00
Jack Andersen 3bedd268e8 Integrate libfmt for format strings 2019-07-19 18:21:39 -10:00
Jack Andersen ebe7463e67 Ignore GCC truncation warning 2019-06-09 16:48:06 -10:00
Jack Andersen a2ffe70b4e Don't kill windows console on abort 2019-05-09 18:06:21 -10:00
Jack Andersen 3da29add5f Implicit switch fallthrough refactor 2019-02-17 19:45:51 -10:00
Jack Andersen 01e291833b New code style refactor 2018-12-07 19:17:15 -10:00
Jack Andersen 22ed01ffc5 Add nxstl 2018-10-06 16:56:33 -10:00
Jack Andersen 82f1df9c40 Use prctl on Linux to set thread name 2018-06-01 14:01:11 -10:00