Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-93] Persist logs to disk

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2019-09-10T04:51:15.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 3.1.0
Componentsappcd-core
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2017-08-11T21:57:06.000+0000
Updated2019-09-10T04:51:15.000+0000

Description

The daemon needs to persist the log to disk. We can do this pretty easily by introducing a listener to the logger and writing the data to a log file. Every time the daemon is started, a fresh log file is created in ~/.appcelerator/appcd/log. We still need to determine a few things: * Should we rotate old logs? Keep last 5 logs? gzip older logs? * How should we handle log files that could potentially be huge? The log messages should be streamed as objects containing metadata such as timestamps, etc. This structure should be preserved when written to disk.

Comments

  1. Chris Barber 2017-11-17

    As of v1.0.0, the daemon has a appcd dump command which generates a dump file including the logs.
  2. Chris Barber 2019-09-10

    Added server.persistDebugLog config setting. Defaults to false because there's no logrotate functionality and we don't want logs to eat up a bunch of space. https://github.com/appcelerator/appc-daemon/commit/efeb91690dd2b15c3ece3f53c1dd51e596a0f25d

JSON Source