Skip to main content
Learn how to query recorded logs using Naite.get() and chaining methods.

Naite.get() Overview

Wildcard Patterns

Flexible key matchingHierarchical queries

Chaining Queries

fromFile, fromFunctionwhere conditions

Various Results

result, first, lastat(index)

Callstack Usage

Call location trackingDebugging support

Basic Usage

Query by Key

Wildcard Patterns

Wildcard Pattern Rules

1. Prefix Matching

When ending with *, prefix matching:

2. Middle Wildcard

When * is in the middle:

3. Exact Matching

Without wildcard, only exact key matches:

Chaining Methods

fromFile() - Filter by Filename

Query only logs called from a specific file:
How it works:

fromFunction() - Filter by Function Name

Query only logs called from a specific function:
Options:
Practical example:

where() - Filter by Data Conditions

Filter by specific fields in log data:
Supported operators:
Path specification:

Chaining Combinations

Write complex queries by chaining multiple methods:

Result Query Methods

result() - Full Array

first() - First

last() - Last

at(index) - nth

Practical Examples

1. Complex Flow Verification

2. Syncer Behavior Verification

3. Error Occurrence Tracking

4. Performance Measurement

Internal Structure

NaiteQuery Class

matchesPattern Logic

Best Practices

1. Clear Key Structure

2. Optimize Chaining Order

3. Result Verification

Cautions

Cautions when using Naite.get(): 1. Empty results: Returns empty array if no logs 2. Order: Returns in recorded order 3. Chaining: Each method returns a new NaiteQuery 4. Wildcards: Understand pattern matching rules 5. where path: Uses radashi’s get path format

Next Steps

Naite Viewer

VSCode Extension usage

Debugging Tests

Using callstack tracking

Recording Logs

Detailed Naite.t() usage

What is Naite?

Naite overview