Better Logger Documentation
User manual for version 1.0.0. Also included in the package as Documentation.pdf. Back to the product page.
Contents
1. What Better Logger does
Better Logger organizes your Unity console. Instead of one long stream of grey text, every log message belongs to a named channel. Each channel has its own color and its own on/off switch.
A log sent to the Player channel looks like this in the Unity Console:
Because each channel can be switched off, you can mute the parts of your game you are not working on and only see the messages you care about.
1.1 Requirements
Unity 2021.2 or newer. No other packages are required.
1.2 What is in the package
The package installs into Assets/Zest Studios/BetterLogger. It contains the compiled tool (Runtime and Editor), a demo scene in the Demo folder, and the manual.
2. Installation and first-time setup
- Import the package from the Asset Store (Window > Package Manager > My Assets).
- After the import finishes, a window called Better Logger Setup opens on its own.
- The window shows a Base Folder field. This is where Better Logger will store your files. The default (
Assets/Zest Studios/Better Logger Config) is fine for almost everyone. - Below the folder field, the window lists exactly which files will be created and where. Check the paths look right.
- Click Set Up Here. Setup creates your config file and your channel list code, and the window closes. You are done installing.
2.1 What setup creates
Setup creates one folder with everything that belongs to you inside it:
Resources/LogConfig.asset (your channel list)
Generated/LogChannels.generated.cs (your channels as code)
These files are yours. Updating Better Logger never changes them (see section 8).
3. Creating your first channel
- Open Tools > Better Logger > Channels.
- Click Create New. A channel named NewChannel appears in the list.
- Click the arrow on the left of the row to expand it, then click Rename... and type a name, for example Player.
- Click the color bar and pick a color. This is the color the channel tag will have in the console.
- Click Save LogChannels Enums at the bottom of the window. This writes your channels into code so you can use them in scripts.
4. Sending logs from code
Add the using line at the top of your script, then call Log.Send:
Log.Send(LogChannels.Player, "Jumped");
Log.Send(LogChannels.Enemies, "Took damage", context: gameObject, type: LogType.Warning);
The full set of options:
LogChannels channel, // which channel
string message, // the text to log
UnityEngine.Object context = null, // click the log to highlight this object
LogType type = LogType.Log); // Log / Warning / Error / Assert / Exception
If a channel is switched off, its messages are skipped completely. Nothing is logged and nothing is computed, so muted channels cost no performance.
4.1 Building your own tools on top
Every send also raises the Log.OnLog event with the time, type, channel id and name, color, message, stack trace, and context object. Subscribe to it to build an in-game console or a debug overlay.
5. The Channels window
Open it from Tools > Better Logger > Channels. Each row is one channel.
| Button | What it does |
|---|---|
| Create New | Adds a channel. It starts enabled, colored white. |
| Rename... | Renames the channel and updates every script that uses it. |
| Color bar | Expand a row to pick the color of the channel tag in the console. |
| Enabled / Disabled | Click the label to mute or unmute the channel. |
| Show Usages... | Lists every script line that logs to this channel. |
| Delete... | Removes the channel. It first shows everything that still uses it, so nothing breaks silently. |
| Save LogChannels Enums | Writes your channel changes into code. It lights up when there is something to save. |
The Default channel always exists and cannot be deleted.
6. Converting your existing Debug.Log calls
If your project already has plain Debug.Log calls, Better Logger can convert them to channels for you.
- Open Tools > Better Logger > Find Debug.Log Usages.
- The window lists every Debug.Log, Debug.LogWarning, and Debug.LogError call in your scripts.
- For each entry, pick a channel from the dropdown next to it.
- Click Swap on the entry. The call is rewritten to
Log.Send. The log type (Warning, Error, and so on) and the context object are kept exactly as they were. - Click Open on any entry to jump to that line in your code editor first, if you want to check it before converting.
7. Where your files live, and moving them
Your channel list (LogConfig.asset) must stay inside a folder named Resources. That is how Unity loads it when your game runs. Setup takes care of this for you.
7.1 Moving the folder
- Open Tools > Better Logger > Setup...
- Pick a new base folder with Browse.... The window shows where each file will end up.
- Click Move Here. The config and the generated code move together.
You can also move the folder by hand in the Project window. Keep the config inside a Resources folder, keep the Generated folder in one piece, and keep only one LogConfig in the project.
8. Updating the package
Updating is safe. An update only replaces the package folder (Assets/Zest Studios/BetterLogger). Your config and your generated channel code live outside it and are never part of an update, so your channels survive every update with no steps needed from you.
9. Troubleshooting
| Problem | Fix |
|---|---|
| The setup window keeps appearing | There is no config yet. Click Set Up Here to create it. |
| My logs are not appearing | Open Tools > Better Logger > Channels and check the channel is not Disabled. Also confirm LogConfig.asset sits inside a folder named Resources. |
| "Multiple LogConfig assets found" | You have more than one config. The setup window lists their paths. Delete the extras so exactly one remains. |
| My new channel is not showing up in code | You did not save. Click Save LogChannels Enums in the Channels window, or run Tools > Better Logger > Rebuild LogChannels.generated.cs. |
| Errors about LogChannels after an update | Let Unity finish importing and recompiling. If anything persists, run Tools > Better Logger > Rebuild LogChannels.generated.cs. |
10. Support
Discord: discord.gg/2ths8Hj9QE (the fastest way to reach us)
Email: studioszest@gmail.com
If anything in this manual is unclear, that is a bug in the manual. Tell us and we will fix it.