سؤال

I am using .net 2.0 and Microsoft Enterprise Library 2.0. How can I customize the log file name and location. I want to create a log file in my app location and current date as file name. I tried fileName="foo"

هل كانت مفيدة؟

المحلول

If you want to incorporate the date into the file name you will have to use programmatic configuration. See Programatic Configuraton - Enterprise Library (v2.0) Logging Block for an example targeting version 2.0 (luckily enough).

If this is a rolling date (change the date every day for example) then you will have to incorporate some reconfiguration (to change the file name) or to create a custom trace listener.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top