Skip to content

Conversation

@JasonVranek
Copy link
Contributor

Adds more flexibility when logging to support writing to both stdout and a file or either. Also the user can choose whether they want the current default formatting, a raw formatting, or JSON formatting according to the requested formats from #225.

Two new fields to the config:

# Log format. Supported values: default, json, raw
# OPTIONAL, DEFAULT: default
format = "raw"
# Log destination. Supported values: stdout, file, both
# OPTIONAL, DEFAULT: stdout
destination = "both"

closes #225

@ltitanb
Copy link
Collaborator

ltitanb commented Feb 10, 2025

Looks good! Could you please fix lint and post some screenshots of how the logs look like with the new config?

@JasonVranek
Copy link
Contributor Author

JasonVranek commented Feb 11, 2025

JSON format, writing both to stdout + file

image

RAW format, writing both to stdout + file

image

DEFAULT format, writing only to stdout

image

note the other permutations work but aren't pictured:

  • JSON + stdout only
  • JSON + file only
  • RAW + stdout only
  • RAW + file only
  • DEFAULT + file only
  • DEFAULT + both

@ltitanb ltitanb changed the title Issue 225 chore: fix log format Feb 17, 2025
@ltitanb
Copy link
Collaborator

ltitanb commented Mar 21, 2025

refactored in #281

@ltitanb ltitanb closed this Mar 21, 2025
@ltitanb ltitanb deleted the issue-225 branch March 21, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add more parameter to one log line

2 participants