LogConfiguration Class

日誌配置類別

Definition

Namespace: eBizprise.Framework
Assembly: eBizprise.Framework.Log.LogHelper (in eBizprise.Framework.Log.LogHelper.dll) Version: 25.0.4.0+adf38c4ccb2bf98d8ad258a6278302b5e05a94ed
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 使用檔案日誌策略

Extension Methods

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 日誌 (從 appsettings 載入)
(Defined by LogConfigurationExtensions)
UseFileAndElasticSearchWithApiKey 同時使用檔案與 ElasticSearch 日誌 (ApiKey Authentication)
(Defined by LogConfigurationExtensions)
WriteJsonFile 寫入Json格式檔案
(Defined by SerializeExtend)

Revision History

DateVersionDescription
2025/12/0825.0.3.0支援環境變數、動態配置

See Also