how to set up logging in subsonic 3.0
How do i set up subsonic 开发者_如何学Pythonto log out my sql queries and what will execute on my sql box?
You can attach a Log writer to the Provider somehow like this
var provider = ProviderFactory.GetProvider("ApplicationServices");
var writer = new StreamWriter(
File.Open(@"c:\temp\sqlqueries.txt", FileMode.Append, FileAccess.Write, FileShare.ReadWrite)
);
provider.Log = writer;
return new SimpleRepository(provider, SimpleRepositoryOptions.RunMigrations);
精彩评论