mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 00:54:23 -04:00
LogManager: implement system module, client api, logging api (#1617)
Some notes: * Unless `atmosphere!enable_log_manager` is true, Nintendo's log manager will be used instead. * This prevents paying memory costs for LM when not enabling logging. * To facilitate this, Atmosphere's log manager has a different program id from Nintendo's. * `atmosphere!enable_htc` implies `atmosphere!enable_log_manager`. * LogManager logs to tma, and the SD card (if `lm!enable_sd_card_logging` is true, which it is by default). * Binary logs are saved to `lm!sd_card_log_output_directory`, which is `atmosphere/binlogs` by default.
This commit is contained in:
parent
a1fb8a91c8
commit
e9849c74cf
94 changed files with 5595 additions and 45 deletions
|
@ -136,6 +136,7 @@ namespace ams::util {
|
|||
|
||||
/* Parse length. */
|
||||
constexpr bool SizeIsLong = sizeof(size_t) == sizeof(long);
|
||||
constexpr bool PointerIsLong = sizeof(uintptr_t) == sizeof(long);
|
||||
constexpr bool IntMaxIsLong = sizeof(intmax_t) == sizeof(long);
|
||||
constexpr bool PtrDiffIsLong = sizeof(ptrdiff_t) == sizeof(long);
|
||||
switch (*format) {
|
||||
|
@ -174,10 +175,10 @@ namespace ams::util {
|
|||
const char specifier = *(format++);
|
||||
switch (specifier) {
|
||||
case 'p':
|
||||
if constexpr (sizeof(uintptr_t) == sizeof(long long)) {
|
||||
SetFlag(FormatSpecifierFlag_LongLong);
|
||||
} else {
|
||||
if constexpr (PointerIsLong) {
|
||||
SetFlag(FormatSpecifierFlag_Long);
|
||||
} else {
|
||||
SetFlag(FormatSpecifierFlag_LongLong);
|
||||
}
|
||||
SetFlag(FormatSpecifierFlag_Hash);
|
||||
[[fallthrough]];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue