Skip to content

Commit

Permalink
Improved logging for troubleshooting conversion errors
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghettidba committed Apr 8, 2019
1 parent f4a2664 commit 851a1e5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ public override void ReadEvents()
catch (Exception e)
{
logger.Error(e, $"Error converting XE data from the stream: {e.Message}");
logger.Error(e, $" client_app_name : {evt.Actions["client_app_name"].Value}");
logger.Error(e, $" database_name : {evt.Actions["database_name"].Value}");
logger.Error(e, $" client_hostname : {evt.Actions["client_hostname"].Value}");
logger.Error(e, $" server_principal_name : {evt.Actions["server_principal_name"].Value}");
logger.Error(e, $" session_id : {evt.Actions["session_id"].Value}");
logger.Error(e, $" duration : {evt.Actions["duration"].Value}");
logger.Error(e, $" logical_reads : {evt.Actions["logical_reads"].Value}");
logger.Error(e, $" writes : {evt.Actions["writes"].Value}");
logger.Error(e, $" cpu_time : {evt.Actions["cpu_time"].Value}");
throw;
}

Expand Down

0 comments on commit 851a1e5

Please sign in to comment.