NLOG Not Creating Table And Logging Errors

Johnathan Simpson 586 Reputation points
2021-08-19T17:58:39.77+00:00

i've set-up nlog for the first time, and have multiple locations in there to log... this is the settings I have in my nlog but the table is never created?

<target xsi:type="Database"
      name="DatabaseTarget"
      keepConnection="true"
      commandType="Text"
      dbDatabase="IISLogging"
      dbUserName="user"
      dbPassword="password"
      dbHost="111.111.11.1"
      commandText="INSERT INTO [Log] (Logged,Level,LogMessage,Exception,StackTrace,Path,Json,Ip) 
                   VALUES (@Logged, @Level, @Message, @Exception, @StackTrace,@Path,@Json,@Ip)">
Community Center Not monitored
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.