LanguageEnglish
  • C#

LogLevel

enumeration

Switch to Manual

Description

Options for different levels of log information supported by the Package Manager.

Set the Package Manager log level to get an appropriate level of detail in the log file. You can temporarily set a lower level, which generates more log information. This technique can help you understand the Package Manager's operations if something unexpected happens. When you complete your investigation, the recommended best practice is to raise the log level to prevent bloating the Package Manager log file.

using System;
using UnityEditor.PackageManager;
using UnityEngine;

[ExecuteInEditMode] public class PackageLogExample: MonoBehaviour { void Start() { Debug.Log($"Current log level: {Client.LogLevel}"); // Set to Debug to see extra debug level operation logs Client.LogLevel = LogLevel.Debug; } }

Properties

ErrorOnly unexpected errors and failures are logged.
WarnAbnormal situations that may result in problems are reported, in addition to anything from the LogLevel.Error level.
InfoHigh-level informational messages are reported, in addition to anything from the LogLevel.Warn level.
VerboseDetailed informational messages are reported, in addition to anything from the LogLevel.Info level.
DebugDebugging messages are reported, in addition to anything from the LogLevel.Verbose level.
SillyExtremely detailed messages are reported, in addition to anything from the LogLevel.Debug level.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961