开发者

EntLib5: Logging application block , configuring via code instead of a config file?

I can't seem to find any examples for configuring EntLib5 logging application block via code.

I have it confi开发者_JAVA百科gured via a config file and its working great but i would love to create another listener via code for writing out a log file for display how my plugins were loaded, succesfully or not.

Anybody have any advice or working example for doing a listener in pure code?


The new fluent configuration interface added in v5.0 gives you an elegant and easy to interpret way to programmatically configure EntLib. See an example here: http://msdn.microsoft.com/en-us/library/ff664363(PandP.50).aspx#fluent_api_logging

IntelliSense will help with the rest.


I have not yet looked at the Entlib 5 yet but in principle the Api should be the same as for Entlib 2.0. Here is an example how to configure it via code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜