LoggerPro — Runtime/Shared¶
What happens between a log call and a stored entry, plus where the category list comes from.
The write path¶
DevLog.cs — the short form for tool code: DevLog.Info("Import", "…") and friends. A thin front for the facade, kept separate because it reads better at a call site and because its name is what the documentation and the examples teach.
LoggerService.cs — the one place a log actually becomes an entry. All six severities share this path; they used to be six near-identical methods, which is how the screenshot side effect ended up welded to LogError alone.
In order, Write does:
- Registers the category if it is new — so a first log from a new category is never dropped
- Formats a header, and details (captured logs skip the formatter, since Unity's own trace is already attached and ours would be stapled on top)
- Echoes to the Unity console, inside a suppression scope so the capture does not re-ingest our own echo and log it forever
- Stores it — with the emission time when one was supplied, which is how captured messages keep the moment Unity produced them rather than the moment the queue drained
- Bumps the storage revision, which is what tells an open console to repaint
- Raises the error hook, main thread only — its one subscriber takes a screenshot, which from a worker could only ever throw
A disabled category is a view filter, not a mute. The entry is still recorded and still echoed; the console leaves its rows out. Returning early here meant a category switched off during a busy stretch lost that stretch for good.
DefaultLogFormatter.cs — header and details formatting, including the stack trace suffix when it is switched on.
Configuration providers¶
ProjectSettingsConfigProvider.cs — the default. Serves the category list from LoggerProStore, which means ProjectSettings/LoggerPro.json.
ResourcesConfigProvider.cs — the pre-2.0 route, loading a LoggerProConfig from a Resources folder. Still here for anyone who injects it deliberately, no longer the default: configuration inside the package was overwritten by every asset update, and Unity includes every Resources folder in player builds regardless of which assembly reads it.
It was called EditorPrefsConfigProvider, which was simply wrong — it has never touched EditorPrefs.
Pass the provider, not the config it currently returns. "Reload From Disk" replaces that instance, and a
CategoryManagerholding the old one silently discards every category change made after the click.
Session state¶
LoggerProClearRegistry.cs — everything "Clear" should also reset: the scanner UIs, the warn-once set, the import session. ClearAll counts what it cleared and what threw, rather than reporting success for reaching the end of a loop that swallows failures.
LoggerProVersion.cs — the single version constant. Read by the startup check, the welcome window, the exporter and every report.