Saturday 15 February 2014

How to create database for a Semantic Logging Application Block with SqlDatabaseSink -



How to create database for a Semantic Logging Application Block with SqlDatabaseSink -

how set sql server database semantic logging. table logging info needs created earlier? if yes, schema used.

i have next code :

var listener = new observableeventlistener(); string connectionstring = @"data source=nibc2025;initial catalog=treedatabase;integrated security=true;user id=sa;password=nous@123"; listener.enableevents(auditingeventsource.log, eventlevel.logalways, keywords.all); databasesubscription = listener.logtosqldatabase ( "test", connectionstring, "traces", buffering.defaultbufferinginterval, 1, timeout.infinitetimespan, 500 ); // next 1 line of code not part of function. // added here show how log information. // within loginformation method phone call 'write' method auditingeventsource.log.loginformation("sgsgg", "sgsg"); databasesubscription.sink.flushasync().wait();

well, since thread gets hits on google regarding semantic logging onto sql db or slab ...

the scripts create db lies here

\packages\enterpriselibrary.semanticlogging.database.1.0.1304.0\scripts

and create eventsource , fire blocks, info given here, shortcut , quick prepare solution

http://entlib.codeplex.com/discussions/540723

regards,

application-blocks logging-application-block semantic-logging

No comments:

Post a Comment