LogLevel 列舉

定義

定義記錄嚴重性層級。Defines logging severity levels.

public enum class LogLevel
public enum LogLevel
type LogLevel = 
Public Enum LogLevel
繼承
LogLevel

欄位

Critical 5

描述無法復原的應用程式或系統損毀,或需要立即注意重大失敗的記錄。Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires immediate attention.

Debug 1

開發期間用於互動式調查的記錄。Logs that are used for interactive investigation during development. 這些記錄主要應包含適用於偵錯的資訊,且不具備任何長期值。These logs should primarily contain information useful for debugging and have no long-term value.

Error 4

在目前執行流程因失敗而停止時進行醒目提示的記錄。Logs that highlight when the current flow of execution is stopped due to a failure. 這些記錄應指出目前活動中的失敗,而非整個應用程式的失敗。These should indicate a failure in the current activity, not an application-wide failure.

Information 2

追蹤應用程式一般流程的記錄。Logs that track the general flow of the application. 這些記錄應具備長期值。These logs should have long-term value.

None 6

不會用來寫入記錄訊息。Not used for writing log messages. 指定記錄類別不應寫入任何訊息。Specifies that a logging category should not write any messages.

Trace 0

包含最詳細訊息的記錄。Logs that contain the most detailed messages. 這些訊息可能包含敏感性應用程式資料。These messages may contain sensitive application data. 這些訊息預設會停用,且永遠不應在生產環境中啟用。These messages are disabled by default and should never be enabled in a production environment.

Warning 3

醒目提示應用程式流程中異常或未預期事件的記錄,這些異常或未預期事件不會造成應用程式執行停止。Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise cause the application execution to stop.

適用於