docs.unity3d.com
    Show / Hide Table of Contents

    Class XRLoggingUtils

    Utility methods for logging.

    Inheritance
    Object
    XRLoggingUtils
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    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, 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, 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, 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, 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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023