开发者

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);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜