{"id":16098742,"url":"https://github.com/awaitlink/readlogs","last_synced_at":"2025-03-17T17:31:19.706Z","repository":{"id":54564808,"uuid":"393740113","full_name":"awaitlink/readlogs","owner":"awaitlink","description":"An unofficial web app for viewing Signal debug logs without manually downloading or unarchiving them","archived":false,"fork":false,"pushed_at":"2024-06-26T20:25:33.000Z","size":292,"stargazers_count":3,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T02:23:05.070Z","etag":null,"topics":["cloudflare-worker","debugging","logging","signalapp","wasm","web-application","yew"],"latest_commit_sha":null,"homepage":"https://readlogs.pages.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awaitlink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-07T16:50:44.000Z","updated_at":"2024-06-26T20:25:37.000Z","dependencies_parsed_at":"2023-02-12T09:01:01.346Z","dependency_job_id":null,"html_url":"https://github.com/awaitlink/readlogs","commit_stats":null,"previous_names":["awaitlink/readlogs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaitlink%2Freadlogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaitlink%2Freadlogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaitlink%2Freadlogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaitlink%2Freadlogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awaitlink","download_url":"https://codeload.github.com/awaitlink/readlogs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243872434,"owners_count":20361479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-worker","debugging","logging","signalapp","wasm","web-application","yew"],"created_at":"2024-10-09T18:24:33.650Z","updated_at":"2025-03-17T17:31:19.355Z","avatar_url":"https://github.com/awaitlink.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Readlogs\nReadlogs is an [unofficial](#disclaimer) web app for viewing [Signal](https://signal.org) debug logs without manually downloading or unarchiving them.\n\nTo use it, create a debug log via the Signal app on your device as described in [this support article](https://support.signal.org/hc/en-us/articles/360007318591), then open [`readlogs.pages.dev`](https://readlogs.pages.dev/) and paste the URL there.\n\n## Current functionality\n- View information and logs from various sections of debug logs, formatted as tables.\n- Search logs by setting a minimum log level (e.g. \"Warn\" to show warnings, errors, and more important log entries, if any) as well as using a (case-insensitive) search query.\n- View and download raw debug log files in plaintext (i.e. unarchived).\n\n### Notable behavior\n- Log entries that span multiple lines (without introducing a new timestamp and other metadata) are assumed to be one log entry.\n- In case of Signal Android, sometimes multiple consecutive log lines repeat the exact same timestamp and metadata. These are collapsed into one entry.\n- Some Signal iOS log entries don't seem to have a log level; it's assumed to be `LogLevel::Info`.\n\n## Overview\nThis repository primarily contains two pieces of software:\n- A Rust web app (via [WebAssembly](https://webassembly.org)) in the [`readlogs`](/readlogs) folder (as well as `index.html` and other files in the root).\n    - Utility procedural macros for the Rust web app in in the [`readlogs-macros`](/readlogs-macros) folder.\n- A small JavaScript [Cloudflare Worker](https://workers.cloudflare.com) in the [`worker`](/worker) folder.\n\n## How it works\n### 1. Parsing the debug log URL\nAll debug log URLs have one of the below formats. The provided URL is parsed before fetching in order catch any potential copy/paste mistakes earlier, thus minimizing requests to the worker.\n\n```text\nhttps://debuglogs.org/{key}{ext?}\nhttps://debuglogs.org/{platform}/{version}/{key}{ext?}\n```\n\n- `platform` is `ios` for Signal iOS, `desktop` for Signal Desktop, and `android` for Signal Android.\n- `version` is the Signal app's version.\n- `key` is a 64-character string consisting of `a-f` and `0-9`.\n- `ext` is `.zip` for Signal iOS, `.gz` for Signal Desktop, and none for Signal Android.\n\n### 2. Fetching\nIn general, the file is fetched using the worker: it's not possible to fetch directly from `debuglogs.org` due to its [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policy.\n\nThere are some differences in the fetching process between Signal Android/Desktop and Signal iOS due to the underlying format that debug logs are uploaded in by the Signal apps:\n\n- **Signal Android/Desktop**\n\n    The file is `gzip`-ped plain text. The worker alters the response received from `debuglogs.org` to indicate this. The web app itself doesn't handle the decompression of the response from the worker (presumably, the browser or its [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) performs it); the web app receives the debug log in plain text.\n\n- **Signal iOS**\n\n    The file is a `zip` archive containing multiple files. The worker delivers it unmodified, and the web app itself handles the decompression.\n\n### 3. Parsing and displaying\nEach file (there is one for Signal Android/Desktop, but multiple in case of Signal iOS) is parsed by the web app immediately after fetching.\n\n**Note:** Signal Desktop *can* output each log entry in a structured JSON format (if you start it from a terminal and look at the output), however the file submitted to `debuglogs.org` has the log in plaintext format, which is what this projects parses.\n\n## Privacy considerations\nNote that debug logs uploaded by the Signal apps already have sensitive information redacted.\n\n### Inferring whether anyone viewed a given debug log\n\nIt could be possible to infer that someone has recently viewed a given debug log using this project because of different response times due to potential additional cache (compared to just downloading from `debuglogs.org`) being hit or missed, etc.\n\nThere are multiple caching layers present:\n\n1. **`debuglogs.org`'s own cache:**\n\n    The behavior of this cache can't be changed by this project. This is also the cache that has an impact in any case, even if you download debug logs from `debuglogs.org` directly. Though depending on its setup, this cache may be more likely to trigger if the request comes from a certain edge data center of Cloudflare's network (which is the case with this project) because the same data center may be used for multiple users.\n\n2. **Cloudflare's caching of the `fetch` call in the worker (that requests the debug log from `debuglogs.org`):**\n\n    This cache appears to be enabled, based on the `cf-cache-status`, `age`, and `last-modified` headers that were returned with the worker's response (they are now being removed: https://github.com/awaitlink/readlogs/commit/7d0a1e830a65f92a3a4218af6cc84a6d97c65a5f).\n\n    However, the `cacheTtl` for the `fetch` call is now set to `0` (https://github.com/awaitlink/readlogs/commit/066dee8148ebd20713dce6756b967f180bd379ff), so this cache immediately expires (see [Cloudflare cache responses](https://developers.cloudflare.com/cache/about/default-cache-behavior/#cloudflare-cache-responses); if the headers mentioned above aren't removed, the `cf-cache-status` given to the browser is `EXPIRED`), meaning the debug log should always be requested from the layer above.\n\n3. **Cloudflare's caching of the worker's response:**\n\n    It's likely that this cache is not enabled.\n\n    In any case, the worker sets the `Cloudflare-CDN-Cache-Control` header to `no-store` as an attempt to disable this cache, but because this header is not removed by Cloudflare, it seems that it is not used by Cloudflare (see [`CDN-Cache-Control`](https://developers.cloudflare.com/cache/about/cdn-cache-control/)).\n\n4. **Caching in the user's browser:**\n\n    The response *is* explicitly cached here (currently, for 7 days) to avoid repeated requests in case the user is viewing the same debug log multiple times.\n\n## Building the app\n1. Install [Yarn](https://yarnpkg.com).\n1. Install CSS dependencies:\n    ```shell\n    yarn install\n    ```\n1. Install [Rust](https://www.rust-lang.org), for example via [`rustup`](https://rustup.rs).\n1. Install [Trunk](https://trunkrs.dev), for example via:\n    ```shell\n    cargo install trunk\n    ```\n1. Build the app:\n    ```shell\n    trunk build\n    ```\n\n    Alternatively, serve it locally:\n    ```shell\n    trunk serve\n    ```\n\n    **Note:** Performance of debug builds may be significantly worse than that of release builds. For this reason, when using the app, it's recommended to build/serve in release mode instead:\n    ```shell\n    trunk build --release\n    ```\n    ```shell\n    trunk serve --release\n    ```\n1. The built app is now available in the `dist` folder.\n\n## Deploying the worker\n1. Follow steps 1–3 of the Cloudflare Workers [Get started guide](https://developers.cloudflare.com/workers/get-started/guide).\n1. Switch to the `worker` folder.\n1. Edit `wrangler.toml` if necessary (e.g. to change the `name` of the worker).\n1. Run the following command to publish your worker:\n    ```shell\n    wrangler publish\n    ```\n1. The worker should now be published at `\u003cname\u003e.\u003cyour-subdomain\u003e.workers.dev`.\n\n## Disclaimer\nThis is an unofficial project. It is *not* affiliated with the Signal Technology Foundation or Signal Messenger, LLC.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaitlink%2Freadlogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawaitlink%2Freadlogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaitlink%2Freadlogs/lists"}