LoggerPro — Examples¶
Two examples live here, and they cover one case: logging from tools inside your own project, where you know LoggerPro is installed.
MyEditorLog.cs¶
MyEditorLogger, a wrapper over RevGaming.LoggerPro.Shared.DevLog. Copy it, rename it, give it the category names your tool uses.
MyEditorLogger.Info("Export", "Export started");
MyEditorLogger.Warning("Export", "Missing reference");
MyEditorLogger.Error("Export", "Mesh has no UVs", mesh); // clickable context object
// Or through one of the named shorthands it defines for its own categories:
MyEditorLogger.Export("Export finished");
MyEditorLogWithContext.cs¶
MyEditorWithContextLog, the same shape with the context object carried through every call, for a tool that always has an asset to point at.
⚠ If you are publishing an asset, do not copy this file¶
RevGaming.LoggerPro.Shared.DevLog lives in LoggerPro's assembly. Any tool that calls it stops compiling the moment it is installed in a project without LoggerPro.
This folder used to say the opposite — the previous README described these files as "safe for redistribution" with "no dependencies on internal LoggerPro classes", and the example it recommended was bound to LoggerPro's assembly. It also documented a four-argument DevLog.Log(category, message, LogType, context) for the Lite case, which Lite never had. Following that guidance produced an asset that broke for every customer who did not own LoggerPro.
To ship a tool, run:
Tools ▸ LoggerPro ▸ Lite Integration ▸ Prepare Lite For My Asset
That generates a private, branded copy of LoggerProLite inside your own assembly, with its own DevLog and an ExampleToolLog.cs wrapper to start from. It works with or without LoggerPro installed, and it gives your users a console and a one-click bug report addressed to you.
See Ship a support channel for the full workflow.
Which DevLog¶
| Type | Assembly | Use it for |
|---|---|---|
DevLog in your generated Lite folder | yours | anything you ship |
RevGaming.LoggerPro.Shared.DevLog | LoggerPro's | your own project only |
Rev + Rab