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

JsonLayout with primitive indented pretty format #5096

Closed
snakefoot opened this issue Oct 30, 2022 · 4 comments · Fixed by #5200
Closed

JsonLayout with primitive indented pretty format #5096

snakefoot opened this issue Oct 30, 2022 · 4 comments · Fixed by #5200

Comments

@snakefoot
Copy link
Contributor

snakefoot commented Oct 30, 2022

Could be nice if JsonLayout could render JSON in indented pretty format:

{
  "date": "2018-11-18 14:21:45.0671",
  "level": "INFO",
  "message": "Some message"
}

For console output, that should be parsed by humans. By adding new option IndentJson (Similar to IndentXml for XmlLayout).

Since "primitive" then it is okay with imperfect output when nesting JsonLayout.

See also: https://stackoverflow.com/questions/53361324/nlog-indented-pretty-formatted-json

See also: https://stackoverflow.com/questions/71046880/format-json-object-in-console-or-file-targets-of-nlog

@kianiehsan66
Copy link

Can I pick this one up?

@snakefoot
Copy link
Contributor Author

@kianiehsan66 Yes you are most wellcome.

@gabortoth-hu
Copy link

@kianiehsan66 still on this?

@snakefoot
Copy link
Contributor Author

NLog v5.1.4 has been released - https://www.nuget.org/packages/NLog/5.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants