Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
FreeFormatter resource mentioned in the question is useful and I could use the output as a base for getting to a working configuration. All the changes were manually performed. - enable throw conf...
Answer
#2: Post edited
FreeFormatter resource mentioned in the question is useful and I could use the output as a base for getting to a working configuration:- enable throw configuration exceptions and allow for internal log messages to be output in a file for understanding what is wrong with the configuration- ```json
- "throwConfigExceptions": "true",
- "internalLogLevel": "Debug",
- "internalLogFile": "<some_path>\\internal_log.log",
- ```
- - extensions must be simplified (example):
- from
- ```json
- "extensions": {
- "add": [
- {
- "assembly": "NLog.Web.AspNetCore"
- },
- {
- "assembly": "NLog.Appsettings.Standard"
- }
- ]
- },
- ```
- to
- ```json
- "extensions": [
- { "assembly": "NLog.Web.AspNetCore" },
- { "assembly": "NLog.Appsettings.Standard" }
- ],
- ```
- - targets must be simplified:
- from
- ```json
- "target": {
- "name": "foo",
- }
- ```
- to
- ```json
- "foo": {
- }
- ```
- - rules changes:
- from
- ```json
- "rules": {
- "logger": [
- {
- "name": "Microsoft.*",
- "maxLevel": "Warn",
- "writeTo": "blackhole",
- "final": "true"
- },
- ```
- to
- ```json
- "rules": [
- {
- "logger": "Microsoft.*",
- "maxLevel": "Warn",
- "writeTo": "blackhole",
- "final": true
- },
- ```
- This is not an exhaustive list, but it should cover most of the aspects to consider when performing the migration.
- [FreeFormatter resource mentioned in the question](https://www.freeformatter.com/xml-to-json-converter.html) is useful and I could use the output as a base for getting to a working configuration. All the changes were manually performed.
- []()- enable throw configuration exceptions and allow for internal log messages to be output in a file for understanding what is wrong with the configuration
- ```json
- "throwConfigExceptions": "true",
- "internalLogLevel": "Debug",
- "internalLogFile": "<some_path>\\internal_log.log",
- ```
- - extensions must be simplified (example):
- from
- ```json
- "extensions": {
- "add": [
- {
- "assembly": "NLog.Web.AspNetCore"
- },
- {
- "assembly": "NLog.Appsettings.Standard"
- }
- ]
- },
- ```
- to
- ```json
- "extensions": [
- { "assembly": "NLog.Web.AspNetCore" },
- { "assembly": "NLog.Appsettings.Standard" }
- ],
- ```
- - targets must be simplified:
- from
- ```json
- "target": {
- "name": "foo",
- }
- ```
- to
- ```json
- "foo": {
- }
- ```
- - rules changes:
- from
- ```json
- "rules": {
- "logger": [
- {
- "name": "Microsoft.*",
- "maxLevel": "Warn",
- "writeTo": "blackhole",
- "final": "true"
- },
- ```
- to
- ```json
- "rules": [
- {
- "logger": "Microsoft.*",
- "maxLevel": "Warn",
- "writeTo": "blackhole",
- "final": true
- },
- ```
- This is not an exhaustive list, but it should cover most of the aspects to consider when performing the migration.
#1: Initial revision
FreeFormatter resource mentioned in the question is useful and I could use the output as a base for getting to a working configuration: - enable throw configuration exceptions and allow for internal log messages to be output in a file for understanding what is wrong with the configuration ```json "throwConfigExceptions": "true", "internalLogLevel": "Debug", "internalLogFile": "<some_path>\\internal_log.log", ``` - extensions must be simplified (example): from ```json "extensions": { "add": [ { "assembly": "NLog.Web.AspNetCore" }, { "assembly": "NLog.Appsettings.Standard" } ] }, ``` to ```json "extensions": [ { "assembly": "NLog.Web.AspNetCore" }, { "assembly": "NLog.Appsettings.Standard" } ], ``` - targets must be simplified: from ```json "target": { "name": "foo", } ``` to ```json "foo": { } ``` - rules changes: from ```json "rules": { "logger": [ { "name": "Microsoft.*", "maxLevel": "Warn", "writeTo": "blackhole", "final": "true" }, ``` to ```json "rules": [ { "logger": "Microsoft.*", "maxLevel": "Warn", "writeTo": "blackhole", "final": true }, ``` This is not an exhaustive list, but it should cover most of the aspects to consider when performing the migration.