LoggerFactory does not work while using SpannerMigrationCommandExecutor
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by tracing SpannerMigrationCommandExecutor and its service-collection registration, then compare logging behavior with that registration removed. Reproduce the sample configuration and verify that the configured LoggerFactory receives log messages while the executor remains registered.
Written by the indexing model from the issue text.
Description
(Copied from other repository)
Here is sample of my log provider:
public class MyLoggerProvider : ILoggerProvider
{
public ILogger CreateLogger(string categoryName)
{
return new MyLogger();
}
public void Dispose()
{ }
private class MyLogger : ILogger
{
public bool IsEnabled(LogLevel logLevel)
{
return true;
}
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
File.AppendAllText(@"C:\temp\log.txt", formatter(state, exception));
Console.WriteLine(formatter(state, exception));
}
public IDisposable BeginScope<TState>(TState state)
{
return null;
}
}
}
Configure logger:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
optionsBuilder.UseSpanner("Data Source=projects/appdev-soda-spanner-staging/instances/orm-test-instance/databases/test_migration_db_4");
}
var lf = new LoggerFactory();
lf.AddProvider(new MyLoggerProvider());
optionsBuilder.UseLoggerFactory(lf);
}
In case of removing SpannerMigrationCommandExecutor from service collection it loges as expected.
- Dominant language
- C#
- Stars
- 34
- Forks
- 13
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/dotnet-spanner-entity-framework
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
googleapis/dotnet-spanner-entity-framework#775 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
googleapis/dotnet-spanner-entity-framework#777 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
googleapis/dotnet-spanner-entity-framework#767 ·
Maintainers usually reply within 1 day
-
priority: p2 samples type: bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
googleapis/dotnet-spanner-entity-framework#722 ·
Maintainers usually reply within 1 day
-
priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
googleapis/dotnet-spanner-entity-framework#712 ·
Maintainers usually reply within 1 day
All issues in googleapis/dotnet-spanner-entity-framework
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
swisstopo/swissgeol-boreholes-suite#3086 ·
Maintainers usually reply within 1 day
-
byte类型在条件中的解析BUGOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dotnetcore/FreeSql#2290 ·
-
status:waiting-for-triage type:bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
microsoftgraph/msgraph-sdk-dotnet#3194 ·
Maintainers usually reply within 1 day
-
Backend enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
UI: money shows the minus sign next to the number, not before the currency (IL -3.0m, not -IL 3.0m)Openarea: sim area: unity enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eyalgolan/statecraft-israel#1107 · 1 comment ·
Maintainers usually reply within 1 day