Version: 5.5
public void Log (LogType logType, object message);
public void Log (LogType logType, object message, Object context);
public void Log (LogType logType, string tag, object message);
public void Log (LogType logType, string tag, object message, Object context);
public void Log (object message);
public void Log (string tag, object message);
public void Log (string tag, object message, Object context);

Parámetros

logType The type of the log message.
tag Utilizado para identificar la fuente de un mensaje de registro. Usualmente identifica la clase dónde la llamada de registro ocurre.
message String u objeto a ser convertido a representación string para ser mostrado.
context Objeto al cual el mensaje se aplica.

Descripción

Registra un message a la Consola de Unity utilizando un logger predeterminado.

See Also: ILogger, ILogHandler.

using UnityEngine;
using System.Collections;

public class MyGameClass : MonoBehaviour { private static ILogger logger = Debug.logger; private static string kTAG = "MyGameTag";

void MyGameMethod() { logger.Log(kTAG, "Hello");

Debug.logger.Log(kTAG, "World");

logger.Log("Hello Logger"); } }