Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it possible to ignore mssqlserver sink if a problem with database connection #546

Unanswered
adurmus asked this question in Q&A
Discussion options

the serilog is configured with appsettings. with configuration.ReadFrom.Configuration(context.Configuration). And if databse cannot be connected for any reason.

What's the best way to ignore Mssqlserver sink if the database cannot be connected instead of throwing an exception?

You must be logged in to vote

Replies: 1 comment

Comment options

The sink only does something on the DB during initialization if you set the sink options AutoCreateSqlDatabase or AutoCreateSqlTable. Those options are intended for debugging/testing purposes where an exception should not be a problem.

In production you should not set those options and create your DB using a different method.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /