Log output?

  • 7 March 2008
  • 2 replies
  • 0 views

Badge +4

I have implemented a project using the K2 logging code and flipped the configuration switch to dump all output to the SQL database.


What database is this output going to go into? Do I have to do anything else to the database in order to accomodate for this? I don't seem to see anything in the documentation anywhere for this...


Thanks!


2 replies

Badge +3

hey endpointsys.


the Q & A below are from an internal thread at K2.  Note that the LogArchive table functionality may not have been working correctly as of mid December 2007.  it was scheduled for a fix in SP1.


Q:  


I’d like to use the logging framework to log all errors to a DB rather than to console/file/eventlog/msmq. I notice that the ArchiveExtension refers to the HostserverDB in the configuration so I turned that on in the hope that it would start logging to somewhere in the HostServer database, the LogArchive table perhaps...


 


    <Extension Name="ArchiveExtension" type="SourceCode.Logging.Extension.ArchiveExtension">


            <Property Name="HostServerConfigFileName" value="K2HostServer.config"/>


      <Property Name="ConfigDBConnectionName" value="HostserverDB"/>


    </Extension>


 


 

what I found was that it created a log file in the ..host serverin directory called hostserver20071212.log


A:
The logger can log to a database if it is enabled using the connection string provided in the K2HostServer.config file. It logs to the HostServer database, the LogArchive table.

Badge +4

A quick check of that table shows logging is working correctly - looks like the SP1 fix is indeed working for that.


Thanks!

Reply