public void SqlQueryStarted(QuerySqlLogEvent querySqlLogEvent) { var information = $"SqlQueryStarted: {querySqlLogEvent.Path} {querySqlLogEvent.TableOrView}"; this.loggingRepository.LogInformation(this.bindingExecution, information); Log.Logger.Debug(information); }
public void SqlQueryCompleted(QuerySqlLogEvent querySqlLogEvent) { var parametersAsString = string.Join(",", querySqlLogEvent.SqlParameters.Select(a => $"{a.Key} = {a.Value}").ToList()); var information = $"SqlQueryCompleted: {querySqlLogEvent.Path} {querySqlLogEvent.TableOrView} {querySqlLogEvent.RowCount} {querySqlLogEvent.TimeElapsed:c} {querySqlLogEvent.Sql} {parametersAsString}"; this.loggingRepository.LogInformation(this.bindingExecution, information); Log.Logger.Debug(information); }