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:
SciresM
2021-09-11 19:32:14 -07:00
committed by GitHub
parent a1fb8a91c8
commit e9849c74cf
94 changed files with 5595 additions and 45 deletions

View File

@@ -317,6 +317,14 @@ namespace ams::settings::fwdbg {
/* (note: this is normally not necessary, and ips patches can be used.) */
R_ABORT_UNLESS(ParseSettingsItemValue("ro", "ease_nro_restriction", "u8!0x1"));
/* Control whether lm should log to the SD card. */
/* Note that this setting does nothing when log manager is not enabled. */
R_ABORT_UNLESS(ParseSettingsItemValue("lm", "enable_sd_card_logging", "u8!0x1"));
/* Control the output directory for SD card logs. */
/* Note that this setting does nothing when log manager is not enabled/sd card logging is not enabled. */
R_ABORT_UNLESS(ParseSettingsItemValue("lm", "sd_card_log_output_directory", "str!atmosphere/binlogs"));
/* Atmosphere custom settings. */
/* Reboot from fatal automatically after some number of milliseconds. */
@@ -370,6 +378,11 @@ namespace ams::settings::fwdbg {
/* 0 = Disabled, 1 = Enabled */
R_ABORT_UNLESS(ParseSettingsItemValue("atmosphere", "enable_htc", "u8!0x0"));
/* Controls whether atmosphere's log manager is enabled. */
/* Note that this setting is ignored (and treated as 1) when htc is enabled. */
/* 0 = Disabled, 1 = Enabled */
R_ABORT_UNLESS(ParseSettingsItemValue("atmosphere", "enable_log_manager", "u8!0x0"));
/* Hbloader custom settings. */
/* Controls the size of the homebrew heap when running as applet. */