[ENHANCEMENT] Add DevLog abstraction to replace raw Debug.Log calls #27

Open
opened 2026-03-12 00:04:05 +00:00 by lavarius · 0 comments
Owner

🟢 Low — Design Enhancement

Debug.Log is used directly everywhere with no way to filter by category, set log levels, or strip logs from builds cleanly.

Fix: Create a thin DevLog wrapper:

public static class DevLog
{
    [System.Diagnostics.Conditional("UNITY_EDITOR")]
    public static void Log(string msg) => Debug.Log(msg);

    [System.Diagnostics.Conditional("UNITY_EDITOR")]
    public static void Warn(string msg) => Debug.LogWarning(msg);
}

Conditional attribute means calls compile away entirely in release — zero overhead, no #if boilerplate needed.

## 🟢 Low — Design Enhancement `Debug.Log` is used directly everywhere with no way to filter by category, set log levels, or strip logs from builds cleanly. **Fix:** Create a thin `DevLog` wrapper: ```csharp public static class DevLog { [System.Diagnostics.Conditional("UNITY_EDITOR")] public static void Log(string msg) => Debug.Log(msg); [System.Diagnostics.Conditional("UNITY_EDITOR")] public static void Warn(string msg) => Debug.LogWarning(msg); } ``` `Conditional` attribute means calls compile away entirely in release — zero overhead, no `#if` boilerplate needed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lavarius/ProjectOverlay#27
No description provided.