Skip to main content
Learn how to view logs from Android devices and emulators for debugging React Native applications.

Overview

Android logging is handled through adb logcat, which displays system and application logs from connected Android devices and emulators.

Usage

Basic Logcat

Displays all system logs (very verbose).

Filter React Native Logs

Shows only React Native-related logs.

Your App’s Logs

Filter logs from your specific app.

Common Filters

By Tag

By Priority

Priority levels (lowest to highest):
  • V - Verbose
  • D - Debug
  • I - Info
  • W - Warning
  • E - Error
  • F - Fatal
  • S - Silent (suppress all)

Multiple Filters

Show ReactNative and ReactNativeJS at Verbose level, suppress everything else.

Output Formats

Brief (Default)

Output:

Time

Output:

Threadtime

Output:

Long

Most detailed format with full metadata.

Useful Commands

Clear Logs

Clears the log buffer.

Save to File

Follow Logs in Real-Time

Last 100 Lines

Colored Output

Use pidcat for colored, filtered logs:

JavaScript Console Logs

console.log()

Appears as:

console.warn()

Appears in logs and shows yellow box in app.

console.error()

Appears in logs and shows red screen in app.

console.debug()

Native Module Logs

Android Log API

In native Android code:
View these logs:

React Native Bridge

Filtering Techniques

Grep Patterns

By Process ID

By Package

Multiple Devices

List Devices

Output:

Target Specific Device

Advanced Filtering

Custom Filter Script

Create filter-logs.sh:
filter-logs.sh
Use:

Color-coded Grep

Performance Monitoring

Memory Logs

CPU and Threading

Crashes

Network

Crash Debugging

View Stack Traces

After Crash

Saves entire log buffer including crash information.

Native Crashes

Shows native crash information and stack traces.

Integration with Development

React Native CLI

When running:
Logs automatically appear in the terminal.

Metro Bundler

When running:
JavaScript logs appear in Metro terminal window.

Separate Log Window

Debugging Tools

React Native Debugger

Standalone app with integrated Chrome DevTools:
Provides:
  • Console logs
  • Network inspector
  • Redux DevTools
  • React DevTools

Flipper

Desktop debugging platform:
Features:
  • Logs viewer
  • Network inspector
  • Layout inspector
  • Database viewer

Chrome DevTools

  1. Open developer menu (Cmd+M or Ctrl+M)
  2. Select “Debug”
  3. Open Chrome DevTools
  4. View Console tab

Log Management

Rotate Logs

Multiple Buffers

Troubleshooting

No Logs Appearing

Solution:
  1. Check device connection:
  1. Restart ADB:
  1. Check log buffers:

Too Much Noise

Solution: Use more specific filters:

Logs Cut Off

Solution: Increase buffer size:

Can’t Find App Logs

Solution: Verify app package name:
Then filter:

Best Practices

  • Use console.log() for general information
  • Use console.warn() for warnings
  • Use console.error() for errors
  • Use console.debug() for verbose debugging
Always use descriptive tags in native code:
Remove or disable verbose logging before production:
  • Development: Metro bundler console
  • Debugging: React Native Debugger or Flipper
  • Native issues: adb logcat with filters
  • Production: Error tracking services (Sentry, Bugsnag)

Next Steps

Run Android

Build and run your Android app

iOS Logs

View iOS device logs

Debugging

Complete debugging guide

Troubleshooting

Common issues and solutions