setProperties method
Performs a bulk update of properties using a map
of key–value pairs.
- If
overwrite
isfalse
, existing properties are not replaced. - This is a convenient way to inject a batch of configuration settings.
Example:
LogProperties.instance.setProperties({
"logging.level.core": "debug",
"logging.level.network": "warn",
});
Implementation
void setProperties(Map<String, String> map, {bool overwrite = true}) {
for (final e in map.entries) {
setProperty(e.key, e.value, overwrite: overwrite);
}
}