You would need to create your own custom tracelistener which will do the logging to the database. Refer to the documentation for the sample on how to create one. You can pattern the logic after the FormattedDatabaseTraceListener class available
in the enterprise library source code. If the values for the 3 or 4 columns you want aren't availabe in the LogEntry class, you can create your own LogEntry class and add those properties.
public class MyLogEntry : LogEntry
...additional properties here
Override the TraceData method of the CustomTraceListener base class so you can control which Write method you want to execute.
Global Technology and Solutions