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

Log lines longer than 16384 characters are improperly joined #3445

Closed
charliefoxtwo opened this issue Dec 5, 2019 · 2 comments
Closed

Log lines longer than 16384 characters are improperly joined #3445

charliefoxtwo opened this issue Dec 5, 2019 · 2 comments

Comments

@charliefoxtwo
Copy link

Bug description
Per moby/moby#22982 and moby/moby#32923, the max length of a line logged in docker is 16k. When the line gets longer, it is streamed to multiple line entries in the log file. This looks like so:

{"log":"<15k+ characters> ... this is a sin","stream":"stdout","time":"2019-12-05T00:26:59.526348635Z"}
{"log":"gle log entry.\n","stream":"stdout","time":"2019-12-05T00:26:59.526348635Z"}}

However, the point where these lines should join when viewing a container's logs in portainer appears to have some sort of special character (). In my case, this renders as either <15k+ characters> ... this is a sin�gle log entry. or with an @ symbol instead (though this isn't actually the symbol - I have no idea what it actually is).

Expected behavior
The line should display as <15k+ characters> ... this is a single log entry.

Steps to reproduce the issue:

  1. Create a container which will attempt to log a line larger than 16384 UTF-8 characters
  2. View container logs in portainer web view
    a. If things render fine, attempt to copy text and notice there will be a weird character at the cutoff point
    b. Alternatively, open developer tools in browser and view source

Technical details:

  • Portainer version: 1.22.2
  • Docker version (managed by Portainer): 18.09.3
  • Platform (windows/linux): linux
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): probably that, but I'm unsure
  • Browser: Firefox 71.0b10 (64-bit)

Additional context
When viewing the log file for the container via docker logs, the entries appear to be joined together with no errors.

@ghost ghost added this to Need triage in Bug triage via automation Dec 9, 2019
@ghost ghost moved this from Need triage to Confirmed in Bug triage Dec 15, 2019
@ghost
Copy link

ghost commented Apr 20, 2020

Reproduced on 1.23.2

@ghost
Copy link

ghost commented Apr 24, 2020

This will be addressed in #3749

@ghost ghost closed this as completed Apr 24, 2020
Bug triage automation moved this from Confirmed to Fixed Apr 24, 2020
chiptus pushed a commit to chiptus/portainer that referenced this issue Aug 13, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant