c# - AdoNetAppender writes to wrong Azure database -
i'm using log4net log sql database in azure. i've got config file setup , working properly. log data getting written. application imports, translates , loads unique set of data each of our customers. in azure create new database each customer. in logging utility have following method should set logging connection string proper client database:
private static void setdbconnection(string connectionstring) { var appender = ((adonetappender)(log.logger.repository.getappenders()[0])); appender.connectionstring = connectionstring; appender.activateoptions(); }
this seems working, however, consitently getting logs client in database client b, , client c , client d , , forth , around.
one thing application multi-threaded, , noticing instance, of client b's data in thread 20, of client c's data in thread 8 etc. looks consistent across databases.
my main question is, how can ensure client a's logs client a's database?
i inherited application, , i'm not familiar threading.
update: additionally, have added object class, lock in method, seemed work @ first in end, i'm still getting same results.
Comments
Post a Comment