Skip to main content

Quick Start

Get up and running with Logget in minutes. This guide covers the most common use cases and options.

Basic Usage

Capture Console Logs

logget --logs https://example.com

Capture Network Requests

logget --network https://example.com

Capture Both

logget --logs --network https://example.com

Output Formats

JSON Output

logget --logs --network --json https://example.com

CSV Output

logget --logs --network --csv https://example.com

HAR Output

logget --network --har https://example.com

YAML Output

logget --logs --network --yaml https://example.com

File Operations

Save to File

logget --logs --output results.txt https://example.com

Append to File

logget --logs --output results.txt --append https://example.com

JSON Output to File

logget --logs --json --output results.json https://example.com

YAML Output to File

logget --logs --yaml --output results.yaml https://example.com

Authentication

Custom Headers

logget --logs --header "Authorization: Bearer token" https://example.com

Multiple Headers

logget --logs --header "Authorization: Bearer token" --header "X-Custom: value" https://example.com

Headers from File

Create headers.txt:

Authorization: Bearer token
X-Custom-Header: value
# Comments are ignored

Use it:

logget --logs --header headers.txt https://example.com

Cookies

logget --logs --cookie "session_id=abc123" https://example.com

Cookies from File

Create cookies.txt:

session_id=abc123
user_token=xyz789
pref=dark_mode; domain=example.com

Use it:

logget --logs --cookie cookies.txt https://example.com

Real-time Streaming

Stream Console Logs

logget -f --logs https://example.com

Stream Network Requests

logget -f --network https://example.com

Stream Both

logget -f --logs --network https://example.com

Custom Refresh Interval

logget -f --logs --refresh 500 https://example.com

Stream with Filtering

logget -f --logs --filter "ERROR|WARN" https://example.com

Filtering

Filter by Status Code

logget --network --status "^2..$" https://example.com
logget --network --status "^(200|204)$" https://example.com

Filter by Domain

logget --network --domain "^api\\.example\\.com$" https://example.com
logget --network --domain "(.*\\.)?example\\.com$" https://example.com

Filter by MIME Type

logget --network --mime "^application/(json|javascript)$" https://example.com

Filter by Size

logget --network --min-size 1024 --max-size 102400 https://example.com

Filter by Resource Type

logget --network --xhr https://example.com
logget --network --img https://example.com
logget --network --script --css https://example.com

Timing Configuration

Custom Timeout

logget --logs --timeout 60 https://example.com

Custom Wait Time

Wait time in milliseconds after page load:

logget --logs --wait 5000 https://example.com

Custom Fingerprints Rotation Interval

logget --fingerprint-interval 3000 https://example.com

JavaScript Execution

Execute JavaScript code in the page context for debugging, testing, or interacting with the page:

Execute Inline Code

logget -e "document.title" https://example.com

Execute from File

logget -e script.js https://example.com

Development Options

Skip SSL Verification

For local development servers with self-signed certificates:

logget -k --logs https://localhost:8080

Quiet Mode

Suppress progress messages:

logget --quiet --logs --network https://example.com

Complete Example

A comprehensive example combining multiple features:

logget \
--logs \
--network \
--json \
--output results.json \
--header "Authorization: Bearer token" \
--cookie "session_id=abc123" \
--timeout 60 \
--wait 5000 \
https://example.com

This command:

  • Captures console logs and network requests
  • Outputs in JSON format
  • Saves to results.json
  • Includes authentication headers and cookies
  • Waits up to 60 seconds for page load
  • Waits 5 seconds after page load

With JavaScript Execution

logget \
--logs \
--network \
--json \
--output results.json \
--header "Authorization: Bearer token" \
--cookie "session_id=abc123" \
--execute "document.title" \
--timeout 60 \
--wait 5000 \
https://example.com

Next Steps