Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs to resolve "Unable to find a method called PostgreSql" #43

Closed
Gambitier opened this issue Dec 10, 2021 · 3 comments
Closed

Fix docs to resolve "Unable to find a method called PostgreSql" #43

Gambitier opened this issue Dec 10, 2021 · 3 comments
Assignees
Labels
bug Something isn't working documentation

Comments

@Gambitier
Copy link

I followed the docs https://github.com/serilog-contrib/Serilog.Sinks.Postgresql.Alternative/blob/master/HowToUse.md#configuration-via-json-file-to-use-named-connection-strings

But got following exception

2021-12-10T07:20:53.8241650Z Unable to find a method called PostgreSql. Candidate methods are:
Serilog.LoggerConfiguration Providers(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Extensions.Logging.LoggerProviderCollection, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
Serilog.LoggerConfiguration Console(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, Serilog.Core.LoggingLevelSwitch, System.Nullable`1[Serilog.Events.LogEventLevel], Serilog.Sinks.SystemConsole.Themes.ConsoleTheme)
Serilog.LoggerConfiguration Console(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Formatting.ITextFormatter, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch, System.Nullable`1[Serilog.Events.LogEventLevel])
Serilog.LoggerConfiguration Debug(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, Serilog.Core.LoggingLevelSwitch)
Serilog.LoggerConfiguration Debug(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Formatting.ITextFormatter, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
Serilog.LoggerConfiguration File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1[System.Int64], Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1[System.TimeSpan])
Serilog.LoggerConfiguration File(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Formatting.ITextFormatter, System.String, Serilog.Events.LogEventLevel, System.Nullable`1[System.Int64], Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1[System.TimeSpan])
Serilog.LoggerConfiguration File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1[System.Int64], Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1[System.TimeSpan], Serilog.RollingInterval, Boolean, System.Nullable`1[System.Int32], System.Text.Encoding)
Serilog.LoggerConfiguration File(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Formatting.ITextFormatter, System.String, Serilog.Events.LogEventLevel, System.Nullable`1[System.Int64], Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1[System.TimeSpan], Serilog.RollingInterval, Boolean, System.Nullable`1[System.Int32], System.Text.Encoding)
Serilog.LoggerConfiguration File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1[System.Int64], Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1[System.TimeSpan], Serilog.RollingInterval, Boolean, System.Nullable`1[System.Int32], System.Text.Encoding, Serilog.Sinks.File.FileLifecycleHooks)
Serilog.LoggerConfiguration File(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Formatting.ITextFormatter, System.String, Serilog.Events.LogEventLevel, System.Nullable`1[System.Int64], Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1[System.TimeSpan], Serilog.RollingInterval, Boolean, System.Nullable`1[System.Int32], System.Text.Encoding, Serilog.Sinks.File.FileLifecycleHooks)
Serilog.LoggerConfiguration PostgreSQL(Serilog.Configuration.LoggerSinkConfiguration, System.String, System.String, System.Collections.Generic.IDictionary`2[System.String,Serilog.Sinks.PostgreSQL.ColumnWriters.ColumnWriterBase], Serilog.Events.LogEventLevel, System.Nullable`1[System.TimeSpan], System.IFormatProvider, Int32, Int32, Serilog.Core.LoggingLevelSwitch, Boolean, System.String, Boolean, Boolean, System.Action`1[System.Exception], Microsoft.Extensions.Configuration.IConfiguration)
Serilog.LoggerConfiguration PostgreSQL(Serilog.Configuration.LoggerSinkConfiguration, System.String, System.String, System.Collections.Generic.IDictionary`2[System.String,System.String], System.Collections.Generic.IDictionary`2[System.String,Serilog.Sinks.PostgreSQL.ColumnWriters.SinglePropertyColumnWriter], Serilog.Events.LogEventLevel, System.Nullable`1[System.TimeSpan], System.IFormatProvider, Int32, Int32, Serilog.Core.LoggingLevelSwitch, Boolean, System.String, Boolean, Boolean, System.Action`1[System.Exception], Microsoft.Extensions.Configuration.IConfiguration)
Serilog.LoggerConfiguration Sink(Serilog.Configuration.LoggerSinkConfiguration, Serilog.Core.ILogEventSink, Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
Serilog.LoggerConfiguration Logger(Serilog.Configuration.LoggerSinkConfiguration, System.Action`1[Serilog.LoggerConfiguration], Serilog.Events.LogEventLevel, Serilog.Core.LoggingLevelSwitch)
[12:50:53 INF] Starting the server...

Then I tried one of the solution suggested here, and it worked for me

"Name": "PostgreSQL",

method with all-capital SQL

#11 (comment)

@SeppPenner
Copy link
Contributor

Yep, the docs are wrong. Thank you for the hint, I will update them soon. Using PostgreSQL is correct.

@SeppPenner SeppPenner self-assigned this Dec 10, 2021
@SeppPenner SeppPenner added bug Something isn't working documentation labels Dec 10, 2021
@SeppPenner
Copy link
Contributor

@all-contributors please add @Gambitier for doc

@allcontributors
Copy link
Contributor

@SeppPenner

I've put up a pull request to add @Gambitier! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation
Projects
None yet
Development

No branches or pull requests

2 participants