Skip to content
This repository was archived by the owner on Nov 9, 2018. It is now read-only.

React to Logging API changes #198

Merged
merged 1 commit into from
Jan 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public SourceInformation GetSourceInformation(MethodInfo method)
}
catch (Exception ex)
{
_logger.LogWarning("Failed to access source information in symbol.", ex);
_logger.LogWarning(0, ex, "Failed to access source information in symbol.");
return null;
}
}
Expand Down Expand Up @@ -198,7 +198,7 @@ private bool EnsureInitialized()
}
catch (Exception ex)
{
_logger.LogWarning("Failed to create DIA DataSource. No source information will be available.", ex);
_logger.LogWarning(0, ex, "Failed to create DIA DataSource. No source information will be available.");
_isInitialized = false;
return _isInitialized.Value;
}
Expand All @@ -218,7 +218,7 @@ private bool EnsureInitialized()
}
catch (Exception ex)
{
_logger.LogWarning("Failed to load symbols. No source information will be available.", ex);
_logger.LogWarning(0, ex, "Failed to load symbols. No source information will be available.");
_isInitialized = false;
return _isInitialized.Value;
}
Expand All @@ -229,7 +229,7 @@ private bool EnsureInitialized()
}
catch (Exception ex)
{
_logger.LogWarning("Failed to read symbols. No source information will be available.", ex);
_logger.LogWarning(0, ex, "Failed to read symbols. No source information will be available.");
_isInitialized = false;
return _isInitialized.Value;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.Dnx.TestHost/TestAdapter/TestHostLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public bool IsEnabled(LogLevel logLevel)
return true;
}

public void Log(
public void Log<TState>(
LogLevel logLevel,
int eventId,
object state,
EventId eventId,
TState state,
Exception exception,
Func<object, Exception, string> formatter)
Func<TState, Exception, string> formatter)
{
string message = null;
if (formatter != null)
Expand Down Expand Up @@ -83,7 +83,7 @@ public void Log(
Payload = JToken.FromObject(new LogMessage()
{
Name = _name,
EventId = eventId,
EventId = eventId.Id,
Level = logLevel.ToString(),
Message = message,
}),
Expand Down