Commit Graph

51 Commits

Author SHA1 Message Date
jgoyvaerts
5296d2e91e Fix xenia.log file not always being created in the executable folder. 2022-06-07 09:41:52 +02:00
Joel Linn
986dcf4f65 [Base] Check success of sync primitive creation
- Mainly use `assert`s, since failure is very rare
- Forward failure of `CreateSemaphore` to guests because it is more easy
  to trigger with invalid initial parameters.
2022-03-08 12:17:57 -06:00
Triang3l
d2ef8d3300 [Base] Android error reporting via SIGABRT/RuntimeException 2022-01-30 18:36:11 +03:00
Wunkolo
1a8068b151 [Base] Add user-literals for several memory sizes
Rather than using `n * 1024 * 1024`, this adds a convenient `_MiB`/`_KiB` user-literal to the new `literals.h` header to concisely describe units of memory in a much more readable way. Any other useful literals can be added to this header. These literals exist in the `xe::literals` namespace so they are opt-in, similar to `std::chrono` literals, and require a `using namespace xe::literals` statement to utilize it within the current scope.

I've done a pass through the codebase to replace trivial instances of `1024 * 1024 * ...` expressions being used but avoided anything that added additional casting complexity from `size_t` to `uint32_t` and such to keep this commit concise.
2022-01-02 11:51:31 -06:00
Conrad Kramer
2962a266b5 Fix xenia-core build on macOS 2021-10-25 00:48:53 +03:00
Triang3l
acbd22840d [Base] Android log sink + sink cleanup 2021-09-13 22:53:19 +03:00
Triang3l
6ce5330f5f [UI] Loop thread to main thread WindowedAppContext 2021-08-28 19:38:24 +03:00
gibbed
80cafd9358 [Base] Clean up simple message box utility. 2021-06-28 11:57:06 -05:00
ztjohnst
a77ed6f4a7 [Base] Add ShowInfoMB / ShowErrorMB functions.
[Base] Add ShowInfoMessageBox / ShowErrorMessageBox functions.
2021-06-28 10:31:18 -05:00
gibbed
5c516cc341 Add missing break in logging. 2021-06-26 12:44:21 -05:00
gibbed
6bd96a5091 Remove unconditional block in logging.
Remove unconditional block in logging. This was done so the previous
commit shows an actual useful diff.
2021-06-26 12:26:10 -05:00
gibbed
458dbba4ae Ensure that logging waits before shutting down.
- Ensure that logging waits until everything is written before shutting
  down.
- Fix a bug where a new log line would not be written until the next
  log line had been appended.
2021-06-26 12:26:10 -05:00
Satori
52230fd4e8 [Base] Fix FileLogSink not writing to log file 2020-11-16 14:04:17 -06:00
Satori
b74eac36c7 [Base] Log to stdout by default 2020-11-16 01:52:27 -06:00
Satori
446837edb1 [Base/Win] Add cvars to enable a console window to be shown with xenia 2020-11-16 01:52:27 -06:00
Satori
42b10209fe [Base] Add support for multiple log sinks in Logger 2020-11-16 01:52:27 -06:00
Sandy Carter
382dd8860f [threading] Change thread names to suit pthread
Shorten names to 16.
Rename Win32 to Windowing.
Shorten GraphicsSystem thread names due to 16 length limit of pthread.
Without this change, both show up as GraphicsSystem.
Remove redundant "Worker" and "Thread" from names.
Remove redundant thread handle from thread name.
2020-11-15 11:12:05 -06:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
gibbed
40cc8c52d7 [Base] Qualify std namespace. 2019-08-04 04:39:22 -05:00
gibbed
8b1f728d85 [Base] Use vwsprintf instead of _vsnwprintf. 2019-08-04 03:44:08 -05:00
gibbed
b685211b96 [Base] Add wide versions of FatalError. 2019-08-04 03:26:18 -05:00
gibbed
b2f62b1982 Clean up cvars (rename, recategorize). 2019-08-03 23:46:03 -05:00
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
Rick Gibbed
e51686bbac Merge pull request #1369 from jgoyvaerts/logger_fix
[Base] Flush the logger before exiting on a fatal error.
2019-05-11 11:45:00 -05:00
Jonathan Goyvaerts
eb5baa41bb Shutdown logging when a fatal error occurs, this fixes the error not showing up in the log file 2019-05-11 14:58:34 +02:00
gibbed
bc0ebcb26e - Clean up log level names, no need for LOG_LEVEL_ prefix when it is an
enum class.
- Clarify usage of log level in comment.
2019-04-30 17:41:27 -05:00
gibbed
fb50f02a98 [Base] Properly flush remaining writes out before shutting down logging. 2018-11-24 08:54:46 -06:00
DrChat
6b8a34c9ba [Base] Fix Travis 2018-03-03 19:15:37 -06:00
DrChat
4fd03e8029 [Base] Shutdown the logger to prevent truncation of output 2018-03-03 19:00:04 -06:00
DrChat
293878cd14 Use the app name as a default logfile. 2017-12-16 11:06:46 -06:00
DrChat
e699be0118 Logging: Add a flag to specify the minimum log level
--log_level = (0=error, 1=warning, 2=info, 3=debug)
2017-03-24 16:28:41 -05:00
Dr. Chat
2bd19478a4 Logger: Properly handle cases where strlen(formatted string) > capacity of log_format_buffer_ (as well as error cases) 2017-02-25 20:03:25 -06:00
DrChat
6d4b06c08f Use stdout as logfile for tests 2017-02-11 00:15:52 -06:00
DrChat
d43e2c7ff8 xenia-cpu-ppc-tests is now building on linux 2017-02-10 23:54:10 -06:00
Dr. Chat
7fb31462e4 Logger: Use platform-agnostic aligned alloc 2017-02-05 20:39:46 -06:00
Dr. Chat
65ca7fc416 Lockless logging 2017-02-04 19:26:39 -06:00
Ben Vanik
e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00
Ben Vanik
0133bec11d Fix empty line logging. 2015-09-06 13:34:19 -07:00
Ben Vanik
e48c3534cc Removing copy to temp buffer in log flush. 2015-09-06 10:28:17 -07:00
Ben Vanik
1d7f345960 Fix logging with null varargs. 2015-08-29 22:22:07 -07:00
Ben Vanik
a86b3821f2 Adding thread handle to logging. 2015-08-29 20:49:26 -07:00
Ben Vanik
b7203c2989 Logging to with a ringbuffer. Much faster. 2015-08-29 18:06:30 -07:00
Ben Vanik
a92566dfc5 More style. 2015-08-07 21:29:03 -07:00
Ben Vanik
e6461f326c Some xb style cleanup. 2015-08-05 22:06:20 -07:00
Ben Vanik
72ad899e9e Starting to remove windows.h includes from things. 2015-07-13 20:49:29 -07:00
Ben Vanik
ba88955be4 vsnprintf return is dumb. 2015-06-07 16:13:05 -07:00
Ben Vanik
bc9652e671 Actually fixing the off by one in log buffer size. 2015-06-04 20:04:39 -07:00
Ben Vanik
d3ddf0e718 Make the log buffer stupid large. 2015-06-04 19:58:26 -07:00
sephiroth99
fbb3878cf4 Remove cxx_compat.h header
Revert commits 6d159dc2 and 3f480d24. Visual Studio 2013 is not
supported anymore, so they are not needed.
2015-05-02 09:36:34 -04:00