docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRLoggingUtils

    Utility methods for logging.

    Inheritance
    object
    XRLoggingUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.XR.CoreUtils
    Assembly: Unity.XR.CoreUtils.dll
    Syntax
    public static class XRLoggingUtils
    Remarks

    These methods mirror the standard Debug log methods, but do not log anything if tests are being run via command line (using -runTests).

    See Running tests from the command line for information about running tests.

    Methods

    Log(string, Object)

    Same as Log(object, Object), but does not print anything if tests are being run.

    Declaration
    public static void Log(string message, Object context = null)
    Parameters
    Type Name Description
    string message

    Log message for display.

    Object context

    Object to which the message applies.

    LogError(string, Object)

    Same as LogError(object, Object), but does not print anything if tests are being run.

    Declaration
    public static void LogError(string message, Object context = null)
    Parameters
    Type Name Description
    string message

    Error message for display.

    Object context

    Object to which the message applies.

    LogException(Exception, Object)

    Same as LogException(Exception, Object), but does not print anything if tests are being run.

    Declaration
    public static void LogException(Exception exception, Object context = null)
    Parameters
    Type Name Description
    Exception exception

    Runtime Exception.

    Object context

    Object to which the message applies.

    LogWarning(string, Object)

    Same as LogWarning(object, Object), but does not print anything if tests are being run.

    Declaration
    public static void LogWarning(string message, Object context = null)
    Parameters
    Type Name Description
    string message

    Warning message for display.

    Object context

    Object to which the message applies.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)