LogConfiguration Class

日誌配置類別

Definition

Namespace: eBizprise.Framework
Assembly: eBizprise.Framework.Log.LogHelper (in eBizprise.Framework.Log.LogHelper.dll) Version: 25.0.5.0+6e92afb880fa099fdfe407c9aa8d1b17eaaf3625
C#
public class LogConfiguration
Inheritance
Object    LogConfiguration

Constructors

LogConfiguration 建構函式

Methods

AddRule 新增自訂 Rule
AddTarget 新增自訂 Target
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetNLogConfiguration 取得 NLog 配置物件
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
SetVariable 設定環境變數
SetVariables 批次設定環境變數
ToStringReturns a string that represents the current object.
(Inherited from Object)
UseFileLogging(FileLoggingConfiguration) 使用檔案日誌紀錄 (完整配置)
UseFileLogging(String, String) 使用檔案日誌策略

Extension Methods

CloneT 跨型別複製物件
(Defined by CoreExtension)
ToBsonString 轉換Bson字串
(Defined by SerializeExtend)
ToBsonString 轉換Bson字串
(Defined by SerializeExtend)
ToJsonString 轉換Json字串
(Defined by SerializeExtend)
ToJsonString 轉換Json字串
(Defined by SerializeExtend)
ToXmlString 轉換Xml字串
(Defined by SerializeExtend)
UseElasticSearch 使用 ElasticSearch 作為日誌目標 (完整配置)
(Defined by LogConfigurationExtensions)
UseElasticSearch 使用 ElasticSearch 作為日誌目標 (Basic Authentication)
(Defined by LogConfigurationExtensions)
UseElasticSearchFromAppSettings 從 appsettings 載入 ElasticSearch 設定並啟用日誌目標
(Defined by LogConfigurationExtensions)
UseElasticSearchWithApiKey 使用 ElasticSearch 作為日誌目標 (ApiKey Authentication)
(Defined by LogConfigurationExtensions)
UseFileAndElasticSearch 同時使用檔案與 ElasticSearch 日誌 (Basic Authentication)
(Defined by LogConfigurationExtensions)
UseFileAndElasticSearchFromAppSettings 同時使用檔案與 ElasticSearch 日誌
(Defined by LogConfigurationExtensions)
UseFileAndElasticSearchWithApiKey 同時使用檔案與 ElasticSearch 日誌 (ApiKey Authentication)
(Defined by LogConfigurationExtensions)
UseFileLoggingFromAppSettings 從 appsettings 載入檔案日誌設定並啟用
(Defined by LogConfigurationExtensions)
WriteJsonFile 寫入Json格式檔案
(Defined by SerializeExtend)

Revision History

DateVersionDescription
2025/12/0825.0.3.0支援環境變數、動態配置
2025/12/1625.0.5.0新增從 appsettings 載入檔案日誌設定功能

See Also