nlog

<target xsi:type="Database" name="AllDatabase" dbProvider="MySql.Data.MySqlClient"
                        connectionString="Server=XXX.XXX.XXX.XXX;Database=ProjectLogDB;Uid=XXX;Pwd=XXX;"
                        commandText="insert into Logs(CreateDate,LogLevel,CallSite,Massage,StackTrace) values (@CreateDate,@LogLevel,@CallSite,@Massage,@StackTrace)">
            <parameter name="CreateDate" layout="${longdate}" />
            <parameter name="LogLevel" layout="${level}" />
            <parameter name="CallSite" layout="${callsite:className=True:fileName=True:includeSourcePath=True:methodName=True}" />
            <parameter name="Massage" layout="${message}" />
            <parameter name="StackTrace" layout="${stacktrace}" />
        </target>
posted @ 2015-08-17 16:30  小毛驴  阅读(226)  评论(0编辑  收藏  举报