npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

log4agent-server

v0.1.2

Published

Local mobile log collector for coding agents.

Readme

log4agent-server

Local mobile log collector for coding agents.

log4agent-server runs on your development machine, receives structured logs from mobile apps over HTTP, stores them as JSONL by device and session, and can print incoming logs in the foreground. It is designed for Android emulator, iOS simulator, Flutter, native Android/iOS, and Kotlin Multiplatform debugging workflows where a coding agent needs a simple way to inspect mobile runtime logs.

Install

npm install -g log4agent-server

Start

Run in the foreground and print logs as they arrive:

log4agent-server start --port 3100

Run in the background:

log4agent-server start --background --port 3100

Check or stop the background server:

log4agent-server status
log4agent-server stop

By default, logs are written to .log4agent under the terminal working directory.

Client Defaults

Mobile clients should post logs to:

  • Android emulator: http://10.0.2.2:3100/logs
  • iOS simulator: http://127.0.0.1:3100/logs
  • Real devices: use your machine's LAN IP, for example http://192.168.1.10:3100/logs

Endpoints

  • GET /health
  • POST /sessions
  • POST /logs
  • GET /logs?tail=100
  • GET /logs?deviceId=<device>&sessionId=<session>&tail=100

Storage

Logs are stored as JSONL:

.log4agent/
  2026-06-05/
    pixel_8/
      1749100000000-abcd.session.jsonl
      1749100000000-abcd.jsonl

Each log entry includes app, deviceId, and sessionId. A session is created when the client SDK is configured and performs its /sessions handshake.

Configuration

CLI options:

log4agent-server start --port 3100 --dir .log4agent
log4agent-server start --background --no-redact

Environment variables:

  • LOG4AGENT_PORT: server port, default 3100
  • LOG4AGENT_DIR: output directory, default .log4agent
  • LOG4AGENT_REDACT: set to false to disable server-side redaction
  • LOG4AGENT_PID_FILE: optional background pid file
  • LOG4AGENT_OUT_FILE: optional background stdout/stderr file

Agent Usage

For coding agents, start the server before reproducing the mobile issue:

log4agent-server start --background
curl "http://127.0.0.1:3100/logs?tail=200"

Then inspect .log4agent or query /logs to correlate logs with the reproduced action.

Repository

Full documentation and mobile client packages:

https://github.com/Icyoung/log4agent