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

Downloadable Serilog files not openable in recommended tool #848

Open
hfloyd opened this issue Nov 4, 2024 · 3 comments
Open

Downloadable Serilog files not openable in recommended tool #848

hfloyd opened this issue Nov 4, 2024 · 3 comments

Comments

@hfloyd
Copy link

hfloyd commented Nov 4, 2024

Issue description

On the "logs" page for an environment, there is a recommendation to install Warren's Log Viewer Tool:

image

However, downloaded log files are not formatted correctly to open in the tool:

image

@hfloyd
Copy link
Author

hfloyd commented Nov 4, 2024

According to Warren, this is the necessary config:

{
  "Serilog": {
    "WriteTo": [
      {
        "Name": "File",
        "Args": {
          "path": ""Logs/application.clef",
          "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact",
          "rollingInterval": "Day",
          "rollOnFileSizeLimit": true
        }
      }
    ]
  }
}

(see: warrenbuckley/Compact-Log-Format-Viewer#313 (comment))

The default config for Cloud projects doesn't seem to include "WriteTo" information... (appsettings.Production.json) Would updating that fix the issue, or break logging in Cloud?

@hfloyd
Copy link
Author

hfloyd commented Nov 5, 2024

Comparing a downloaded Cloud Log file to a local log file (which DOES open in the Log Viewer), it seem the primary noticeable difference is a comma between the individual log entries.

If I do a find/replace in the downloaded file of }, { to } { I still get the error message, though.

@hfloyd
Copy link
Author

hfloyd commented Nov 5, 2024

Interestingly, if I download the Log file via Kudu, it opens in the Viewer without any issue. (/site/wwwroot/umbraco/Logs/)

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

No branches or pull requests

1 participant