{ "id": "172410", "key": "DAEMON-264", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2018-10-08T22:07:20.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56909", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "169517", "key": "DAEMON-93", "fields": { "summary": "Persist logs to disk", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2020-02-13T07:20:34.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "15610", "name": "appcd-logger" } ], "description": "There is no per-request log output. There's a massive log stream accessible via {{appcd logcat}} or {{appcd dump}}, but they are subject to size limitations and timing.\r\n\r\nIt would be amazing if there was a way to output or write to disk a log messages generated by a single request.\r\n\r\nHowever, this task is not straightforward. Given the decoupled architecture of the daemon and its plugins, it's impossible to track log messages without having some sort of request ID. In other words, we can only support this feature with requests coming from WebSocket sessions and not HTTP because the Appc Daemon WebSocket protocol mandates each request have a unique ID.\r\n\r\nWe need to think about how to link that request ID to log messages generated by the request. The log stream is essentially a global object which means there is a single point of entry across the entire daemon. Perhaps it's possible to proxy all log messages per context before they are written to the logger in which we can tag the log messages with the request ID?\r\n\r\nIts worth noting that ALL logging is performed in the {{appcd-core}}. All plugins ship their log messages through the IPC tunnel, so whatever solution works for code running internally in the daemon should also work in plugins.", "attachment": [], "flagged": false, "summary": "Output log messages for specific request", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }