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

Improve NLog XSD Schema with better support for Layout-options #5213

Open
snakefoot opened this issue May 5, 2023 · 0 comments
Open

Improve NLog XSD Schema with better support for Layout-options #5213

snakefoot opened this issue May 5, 2023 · 0 comments

Comments

@snakefoot
Copy link
Contributor

snakefoot commented May 5, 2023

Current NLog Schema complains about Layout-options when not declared like simple attributes:

<?xml version="1.0" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true">
    <targets>
        <target name="database" xsi:type="Database">

            <dbProvider>mssql</dbProvider>

            <commandText>
                insert into LogTable(time_stamp,level,logger,message) values(@time_stamp, @level, @logger, @message);
            </commandText>

            <parameter name="@time_stamp" layout="${date}" />
            <parameter name="@level" layout="${level}" />
            <parameter name="@logger" layout="${logger}" />
            <parameter name="@message" layout="${message}" />
        </target>
    </targets>

    <rules>
        <logger name="*" minlevel="Debug" writeTo="database" />
    </rules>
</nlog>

Could be nice if the NLog XSD Schema would accept the above as valid (Notice <dbProvider> works because xsi:string, but not <commandText>)

@snakefoot snakefoot changed the title Improve NLog XSD Schema with better support for Layout-properties Improve NLog XSD Schema with better support for Layout-options May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant