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
Add endpoint to log client events #5918
Conversation
|
Can we put the client name first so they're all in a single location on the filesystem? Our ffmpeg logs have a similar pattern, which I find quite convenient. |
|
Definitely useful for dlna-playTo client logging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the api endpoint require authorization?
Co-authored-by: dkanada <dkanada@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have an endpoint to upload a large log for when clients crash and want to upload a dump.
edit: so not an array but really just a plaintext document
This has been added. The files will automatically be cleaned up by the existing |
|
I still don't like this approach. The server should not be responsible for proper logging on the clients. You still need an admin to access the uploaded logs, it's not really an improvement for normal users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could a setting to globally enable the feature as well as one to set the IClientEventLogger used by the server be added? That might help ease some of the concerns raised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should we add a administrator option to disable client log uploads?
- If yes: How will the API tell us a upload was denied? Do we use a HTTP status code for that?
- Which clients want to use this API?
- Do they use it for logging, "dumping" or both?
- ATV will not use the LogEvent(s) operations, only the LogFile operation
- Do they use it for logging, "dumping" or both?
- Would it make sense to rename "LogFile" to something like "LogDocument"?
- Do we need to limit the size of a log file?
- Can we get client & device info from the authorization header when logging a file?
|
System setting added: |
Jellyfin.Api/Models/ClientLogDtos/ClientLogDocumentResponseDto.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Niels van Velzen <nielsvanvelzen@users.noreply.github.com>
9749f01
to
f4844c0
Compare
|
@crobibero can you rebase to fix the merge conflict and so we can see if #6308 works? |
|
| [ProducesResponseType(StatusCodes.Status403Forbidden)] | ||
| public async Task<ActionResult> LogEvent([FromBody] ClientLogEventDto clientLogEventDto) | ||
| { | ||
| if (!_serverConfigurationManager.Configuration.AllowClientLogUpload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also have been a policy, but I'm also not a fan of the policies.
This should be fixed now, do you want to rebase again so we can test it? |
42d4e0d
to
17264a6
Compare
|
@jellyfin-bot rebase |
Changes in OpenAPI specification found. Expand to see details.What's New
|
Fixes #5646
This logs all events to files separated by the
ClientNameparameter as the following to the filelog_{ClientName}_{yyyymmdd}.logUpdated openapi: openapi_client_event.json.txt
Note- these endpoints don't currently require authentication, so that may change depending on feedback.