a phoenix liveview app for viewing and analyzing client and server logs from commontools.
- unified timeline view merging client and server logs by timestamp
- automatic log format detection (client json export or server log files)
- entity extraction for doc ids, charm ids, and space ids
- drag and drop file upload supporting multiple files up to 100mb each
- real-time parsing and display with phoenix liveview
to download client logs from commontools:
- open a pattern in your browser
- click the bug button (🪲) in the top right header to open the debugger
- if logging is not enabled, click "DB Log OFF" to turn it on (it will change to "DB Log ON")
- interact with the pattern to generate logs
- click the "💾 Export DB" button to download the logs as a json file
expected json format:
{
"exportedTimestamp": 1763755382416,
"logs": [
{
"timestamp": 1763753972077,
"level": "error",
"module": "extended-storage-transaction",
"key": "storage-error",
"messages": ["read Error", {}, null]
}
]
}to collect server logs from toolshed:
- start the dev servers using
./scripts/restart-local-dev.shfrom the labs repository root - interact with the application to generate logs
- the toolshed logs are written to
packages/toolshed/local-dev-toolshed.log - upload that log file to the log viewer
toolshed text format:
[INFO][toolshed::14:30:45.123] server started on port 8000
[ERROR][memory::14:30:46.456] failed to store doc
macos:
brew install elixirlinux (ubuntu/debian):
sudo apt-get update
sudo apt-get install elixirother platforms: see https://elixir-lang.org/install.html
mix local.hex
mix archive.install hex phx_newinstall dependencies:
mix setupstart the phoenix server:
mix phx.servervisit http://localhost:4000 and upload your log files.
mix testLogViewer.Parser- detects and parses client json and server text logsLogViewer.Timeline- builds unified timeline from parsed logsLogViewer.EntityExtractor- extracts and indexes doc ids, charm ids, and space idsLogViewerWeb.TimelineLive- phoenix liveview component for file upload and timeline display