windows - Can IsLoggingEnabled() change at runtime? -
i'm encapsulating entlib 5 logging application block. i've seen in documentation every time want log, should give "isloggingenabled()". fact it's method , not property, tell me operation takes time done, but... cache value in local variable , check if it's possible log or not based on it?
cheers.
you can not, through code, change logging settings, said @ enterprise library document. there can read that:
note:
run time changes configuration of logging application block automatically detected after short period, , logging stack updated. however, cannot modify logging stack @ run time through code. details of using configuration mechanisms can update @ run time, see updating configuration settings @ run time.
that is, while can't enable/disable programatically logging, can change @ run time if configuration edited manually.
so, why you'll need access isloggingenabled()
operation every time, , it's not idea cache it's value.
Comments
Post a Comment