Readlogs is an unofficial web app for viewing Signal debug logs without manually downloading or unarchiving them.
To use it, create a debug log via the Signal app on your device as described in this support article, then open readlogs.pages.dev
and paste the URL there.
- View information and logs from various sections of debug logs, formatted as tables.
- 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.
- View and download raw debug log files in plaintext (i.e. unarchived).
- Log entries that span multiple lines (without introducing a new timestamp and other metadata) are assumed to be one log entry.
- In case of Signal Android, sometimes multiple consecutive log lines repeat the exact same timestamp and metadata. These are collapsed into one entry.
- Some Signal iOS log entries don't seem to have a log level; it's assumed to be
LogLevel::Info
.
This repository primarily contains two pieces of software:
- A Rust web app (via WebAssembly) in the
readlogs
folder (as well asindex.html
and other files in the root).- Utility procedural macros for the Rust web app in in the
readlogs-macros
folder.
- Utility procedural macros for the Rust web app in in the
- A small JavaScript Cloudflare Worker in the
worker
folder.
All 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.
https://debuglogs.org/{key}{ext?}
https://debuglogs.org/{platform}/{version}/{key}{ext?}
platform
isios
for Signal iOS,desktop
for Signal Desktop, andandroid
for Signal Android.version
is the Signal app's version.key
is a 64-character string consisting ofa-f
and0-9
.ext
is.zip
for Signal iOS,.gz
for Signal Desktop, and none for Signal Android.
In 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 policy.
There 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:
-
Signal Android/Desktop
The file is
gzip
-ped plain text. The worker alters the response received fromdebuglogs.org
to indicate this. The web app itself doesn't handle the decompression of the response from the worker (presumably, the browser or itsfetch
API performs it); the web app receives the debug log in plain text. -
Signal iOS
The file is a
zip
archive containing multiple files. The worker delivers it unmodified, and the web app itself handles the decompression.
Each file (there is one for Signal Android/Desktop, but multiple in case of Signal iOS) is parsed by the web app immediately after fetching.
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.
Note that debug logs uploaded by the Signal apps already have sensitive information redacted.
It 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.
There are multiple caching layers present:
-
debuglogs.org
's own cache: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. -
Cloudflare's caching of the
fetch
call in the worker (that requests the debug log fromdebuglogs.org
):This cache appears to be enabled, based on the
cf-cache-status
,age
, andlast-modified
headers that were returned with the worker's response (they are now being removed: https://github.com/awaitlink/readlogs/commit/7d0a1e830a65f92a3a4218af6cc84a6d97c65a5f).However, the
cacheTtl
for thefetch
call is now set to0
(https://github.com/awaitlink/readlogs/commit/066dee8148ebd20713dce6756b967f180bd379ff), so this cache immediately expires (see Cloudflare cache responses; if the headers mentioned above aren't removed, thecf-cache-status
given to the browser isEXPIRED
), meaning the debug log should always be requested from the layer above. -
Cloudflare's caching of the worker's response:
It's likely that this cache is not enabled.
In any case, the worker sets the
Cloudflare-CDN-Cache-Control
header tono-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 (seeCDN-Cache-Control
). -
Caching in the user's browser:
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.
-
Install Yarn.
-
Install CSS dependencies:
yarn install
-
Install Trunk, for example via:
cargo install trunk
-
Build the app:
trunk build
Alternatively, serve it locally:
trunk serve
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:
trunk build --release
trunk serve --release
-
The built app is now available in the
dist
folder.
- Follow steps 1–3 of the Cloudflare Workers Get started guide.
- Switch to the
worker
folder. - Edit
wrangler.toml
if necessary (e.g. to change thename
of the worker). - Run the following command to publish your worker:
wrangler publish
- The worker should now be published at
<name>.<your-subdomain>.workers.dev
.
This is an unofficial project. It is not affiliated with the Signal Technology Foundation or Signal Messenger, LLC.