Color Settings

The below code is an example of how to change the color of the Info log type in the CatLog library. With this method, you can easily change the log color in real-time without the need to open the custom inspector. This can be particularly useful when you need to make changes to your log system during runtime.

Additionally, you can change the color of the other log types (e.g. Debug, Warning, Error, and Fatal) by modifying the corresponding property in the Settings.Colors class. It is recommended to keep your log colors consistent across your application, but you can change them as needed to better suit your use case.

using UnityEngine;
using CatLog;

public class CustomLogBehaviour : MonoBehaviour
{
    private void Start()
    {
        // Change the color of the Info log to green
        Log.Settings.Colors.InfoLogColor = "green";

        Log.Info("A message");
    }
}

Supported Colors

To see all the available colors, check out the Supported Colors section:

Last updated