Skip to content

Cannot resolve InsightsMessageHandler when using UseTinyInsightsAsILogger() #57

@jesshannon

Description

@jesshannon

UseTinyInsightsAsILogger only registers an ILogger and InsightsMessageHandler.

But InsightsMessageHandler requires IInsights so it always fails.

It might make more sense to just have UseTinyInsights() and then an additional method to add it as an ILogger implementation on the ILoggerBuilder.

Example:

.UseTinyInsights("[connection string]",
  provider =>
  {
      provider.IsTrackDependencyEnabled = true;
      provider.IsTrackEventsEnabled = true;
      provider.IsTrackErrorsEnabled = true;
      provider.IsTrackPageViewsEnabled = true;
      provider.IsTrackCrashesEnabled = true;
  })
.Logging.AddTinyInsightsLogger();

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglibrary

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions