Skip to content

VixCore Logging

Namespace: VixCore.Logging

Use VixLogger for categorized logs that can be enabled or disabled per component.

VixLogger

using UnityEngine;
using VixCore.Logging;

public class PlayerController : MonoBehaviour
{
    [SerializeField] private VixLogger log = new("PlayerController");

    private void Start()
    {
        log.Log("Ready");
        log.LogWarning("Low stamina");
        log.LogError("Missing dependency");
    }
}

VixLogger exposes these flags in the inspector:

  • enabled
  • infoEnabled
  • warningEnabled
  • errorEnabled
  • category

Static Logging

VixLogger also has static helpers:

VixLogger.Log("SaveSystem", "Save complete");
VixLogger.LogWarning("Combat", "Low health");
VixLogger.LogError("Bootstrap", "Missing service");

Legacy VixLog

VixLog still exists, but it is marked obsolete. Prefer VixLogger for new code.