NLog.Extensions.Logging: Error has been raised. Exception: System.ArgumentException: Target cannot be found: 'Database'

Getting following error when trying log error to database . I am using Nlog.web.aspnetcore

Error in Parsing Configuration File. Exception: NLog.NLogConfigurationException: Exception occurred when loading configuration from NLog.config ---> System.ArgumentException: Target cannot be found: 'Database'
   at NLog.Config.Factory`2.CreateInstance(String name)
   at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement(NLogXmlElement targetsElement)
   at NLog.Config.XmlLoggingConfiguration.ParseNLogElement(NLogXmlElement nlogElement, String filePath, Boolean autoReloadDefault)
   at NLog.Config.XmlLoggingConfiguration.Initialize(XmlReader reader, String fileName, Boolean ignoreErrors)
   --- End of inner exception stack trace ---
2016-07-09 18:47:00.1213 Error Error has been raised. Exception: System.ArgumentException: Target cannot be found: 'Database'
   at NLog.Config.Factory`2.CreateInstance(String name)
   at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement(NLogXmlElement targetsElement)
   at NLog.Config.XmlLoggingConfiguration.ParseNLogElement(NLogXmlElement nlogElement, String filePath, Boolean autoReloadDefault)
   at NLog.Config.XmlLoggingConfiguration.Initialize(XmlReader reader, String fileName, Boolean ignoreErrors)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

The event logger isn’t supported in netplatform/net core. See https://github.com/NLog/NLog/wiki/platform-support