Skip to content

Unable to add LogType to ColumnOptions.Store from config appSettings #80

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

Closed
kanthikp opened this issue Apr 5, 2017 · 5 comments · Fixed by #167
Closed

Unable to add LogType to ColumnOptions.Store from config appSettings #80

kanthikp opened this issue Apr 5, 2017 · 5 comments · Fixed by #167
Assignees

Comments

@kanthikp
Copy link

kanthikp commented Apr 5, 2017

Currenlty there is no way to add/remove the Standard Columns from ColumnOption.Store using the config appSettings.
example settings as below:

<add key="serilog:using:MSSqlServer" value="Serilog.Sinks.MSSqlServer"     />
    <add key="serilog:write-to:MSSqlServer" />
    <add key="serilog:write-to:MSSqlServer.connectionString" value="conncetionstring" />
    <add key="serilog:write-to:MSSqlServer.tableName" value="ApplicationSerilog" />
    <add key="serilog:write-to:MSSqlServer.autoCreateSqlTable" value="true" />
    **<add key="serilog:write-to:MSSqlServer.columnOptions.Store" value="[0,1,2,3,4,5,6]" />**

Is there any workaround?

@JamesItSolutionsLtd
Copy link

I also require this. Does anyone have a solution

@alphaleonis
Copy link
Contributor

Seems to be a duplicate of #103, or close to it anyway. No such support exists as of now from what I understand (or can find in the codebase), but it should be possible to extend the MSSqlServerConfigurationSection and add support for this.

@MV10 MV10 added the up-for-grabs This issue waits for a contributor to fix it. label Sep 30, 2018
@MV10
Copy link
Contributor

MV10 commented Oct 13, 2018

Part of a PR I'm working on should prepare app.config for another PR to bring it up to full parity with JSON config.

@MV10 MV10 self-assigned this Oct 15, 2018
@MV10 MV10 removed the up-for-grabs This issue waits for a contributor to fix it. label Oct 15, 2018
@MV10
Copy link
Contributor

MV10 commented Oct 15, 2018

Actively working on the XML config PR now.

I had forgotten what a giant hassle XML configuration is! 😀

@MV10
Copy link
Contributor

MV10 commented Oct 16, 2018

The PR will be open for a few days and I have more testing to do, but the updated External Configuration section of the revised docs shows that all features can be configured from XML after this change:

https://github.com/serilog/serilog-sinks-mssqlserver/blob/9574ce3b1f30d7ea7fe813fe492bcff38ddcb353/README.md#xml-net-framework-columnoptions-configuration

@MV10 MV10 closed this as completed in #167 Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants