@rbxts/rlog > RLog > UpdateDefaultConfig
RLog.UpdateDefaultConfig() method
Merges the given config with the existing config for the default instance.
Since all RLog instances inherit their config from the default instance, this is a convenient way to provide default configuration settings.
Signature:
static UpdateDefaultConfig(config: PartialRLogConfig): void;
Parameters
Parameter | Type | Description |
---|---|---|
config | The RLogConfig to use. |
Returns:
void
Example
RLog.UpdateDefaultConfig({ serialization: { encodeFunctions: true } });
// Inherits the `encodeFunctions` setting automatically
const logger = new RLog({ serialization: { encodeRobloxTypes: false } });
logger.i("Player died", { player: player, location: player.Position, revive: () => {} });
// > [INFO]: Player died
// > { "data": { "player": 1338, "location": "<Vector3>", "revive": "<Function>" } }