LoggingHelper
Coding Style wiki
LoggingHelper is the Editor helper tool of LoggingSystem, providing config file creation, writing, and format conversion (BYTES [Cipher] and JSON [Plaintext]); it can additionally be called if you need to write your own BuildTool.
| Namespace | OxGKit.LoggingSystem.Editor |
| Type | public static class LoggingHelper |
| Source | LoggingHelper.cs |
using OxGKit.LoggingSystem.Editor;
Menu Items
| Menu | Description |
|---|---|
Assets/Create/OxGKit/Logging System/[JSON - Plaintext] Create LoggerConfig.dat (In StreamingAssets) | Creates a JSON (plaintext) config file in StreamingAssets. |
Assets/Create/OxGKit/Logging System/[BYTES - Cipher] Create LoggerConfig.dat (In StreamingAssets) | Creates a BYTES (cipher) config file in StreamingAssets. |
Assets/OxGKit/Logging System/Convert LoggerConfig.dat (BYTES [Cipher] <-> JSON [Plaintext]) | Converts the selected StreamingAssets config file between formats. |
Reminder Cipher is recommended for release builds; the config file name and extension can be customized via LoggingSettings.
Methods
WriteConfig
public static void WriteConfig(LoggersConfig loggersConfig, ConfigFileType configFileType = ConfigFileType.Bytes)
Writes the LoggersConfig to the StreamingAssets config file with the specified ConfigFileType.
using OxGKit.LoggingSystem;
using OxGKit.LoggingSystem.Editor;
// BuildTool example: output the cipher config before building
var loggersConfig = new LoggersConfig();
LoggingLauncher.ReloadLoggersConfigAndSet(loggersConfig, (result) =>
{
LoggingHelper.WriteConfig(result, ConfigFileType.Bytes);
});