-
Notifications
You must be signed in to change notification settings - Fork 0
ConfigManager Documentation
Voidless7125 edited this page Sep 27, 2024
·
3 revisions
- Description: Retrieves the current setting for logging to a file.
-
Return Type:
bool -
Return Value:
trueif logging to a file is enabled,falseotherwise.
- Description: Sets the configuration for logging to a file.
-
Parameters:
-
logToFile(type:bool): The new setting for logging to a file (trueto enable logging,falseto disable logging).
-
ConfigManager.getLogToFile();ConfigManager.setLogToFile(true); // Enable logging to a file// Check if logging to a file is enabled
if (ConfigManager.getLogToFile()) {
// Perform logging to a file (If true)
} else {
// Do not log to a file
}- The
ConfigManagerclass can be used while the program is running, it does not have to be startup only. - Changes made to the configuration settings needs to be saved to a SD card. If there is no SD card, this will not work across reboots of programs.