Skip to content

/api/server/logs: documented 'lines' and 'level' query params are never parsed #46

Description

@takusaito-ctrl

Environment: ILCE-7M5 · USB · Camera Remote SDK V2.02.00 · linux-arm64 · server 3.0.0

Summary

GET /api/server/logs documents lines and level query parameters in api/openapi.yaml, but the handler ignores them entirely and always returns 100 entries at info.

The code

api/server/src/CameraWebServer.cpp:3262-3266, in handleApiServerLogs:

// Parse query parameters: ?lines=100&level=info
int maxLines = 100;
std::string minLevel = "info";
// Query params could be parsed from request.path if needed in the future

The values are hardcoded and the comment acknowledges the parsing was never implemented.

Observed

?lines=5 and ?level=error both return the same unfiltered 100-entry payload as a bare request.

Expected

Either implement the parsing, or remove the parameters from the OpenAPI spec so the contract matches reality. Given the spec is the stated source of truth for this project, implementing them is probably the right call — a level filter in particular is genuinely useful when diagnosing the camera-lock hangs in #41/#43, since /api/server/logs is the one endpoint that still responds while the camera lock is held.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions