tlt
The Transaction Log Tool (rumi tlt) is an interactive utility for querying and analyzing Rumi transaction logs.
Overview
The Transaction Log Tool provides capabilities for browsing and querying the recovery transaction logs and inbound/outbound transaction logs recorded by a Rumi application. The terms 'log' and 'transaction log' are used interchangeable herein for the sake of brevity.
Key capabilities:
Browse transaction logs - Navigate through log entries
Query with SQL-like syntax - Use XPQL (Rumi Query Language) to query logs
Create indexes - Build indexes for faster queries
Export results - Dump results to console, CSV, or HTML
Archive logs - Package logs with tool for portable analysis
Compare logs - Identify differences between log files
Usage
Syntax:
rumi tlt [log-path]Parameters:
[log-path]- Optional path to transaction log or directory (opens all logs in directory)
Examples:
Interactive Tool Features
The tool supports a subset of ReadLine functionality with familiar unix-style command line operations:
Command history
Tab command completion
Command scripting
Basic Usage Example
Opening logs and browsing:
Displaying entries:
Operating Modes
The Transaction Log Tool operates in two modes:
Browse Mode
In browse mode the prompt indicates the log that is being browsed. Navigate logs using:
next- Display next entrynexttxn- Display next transactionskip/skiptxn- Skip entries/transactionsrewind- Return to start of logswitch- Switch between logsdump- Dump entire log to console or file
Format options:
Default: Brief tabular format
-dflag: Detailed JSON format-cflag: CSV format.htmlextension: HTML table format
Query Mode
In query mode all opened logs can be queried with SQL-like syntax using XPQL (Rumi Query Language).
Key features:
SQL-like SELECT, WHERE, GROUP BY, ORDER BY, LIMIT clauses
Create indexes for faster queries
Export query results to various formats
Aggregate functions (COUNT, MIN, MAX, SUM, AVG)
Example query session:
Switch to query mode with:
For detailed information on query syntax, see Querying Transaction Logs.
Scripting
The tool supports scripting for automation and batch processing.
Init Scripts
Starting with 1.9, the Transaction Log Tool accepts a -i command line option that is interpreted as a comma separated list of initial scripts to run prior to entering the main command processing loop in interactive mode, or before running a script specified by the -s option.
Init scripts are useful in cases where an application would always issue a set of commands at startup.
You can also set init scripts via -Dnv.tlt.initScripts system property.
Batch Mode
Launch the tool in non-interactive mode by supplying a script using the -s <scriptname> option:
Script format:
Lines starting with
//are commentsBlank lines are ignored
Scripts should end with
exitorbyecommandEach line is processed as a command
Script Command
Run a script from within the tool:
Properties (Variables)
The tool supports two types of properties:
Configuration Properties
Settings that configure tool behavior. These are persistent across tool invocations for a given user.
Common configuration properties:
timestampFormat
yyyy-MM-dd HH:mm:ss.SSS z
Timestamp display format
timestampTZ
DEFAULT
Timezone for timestamps (DEFAULT uses system timezone)
displayMetadata
On
Show metadata with entries (On/Off/Only)
filterUnsetFields
Off
Filter unset field values in detailed output
jsonStyle
Default
JSON output style (Default/Minimal/SingleLine/Custom)
selectPreviewCount
0
Number of results to preview after query execution
deleteExtractedArchivesDirOnExit
off
Clean up extracted archives on exit
Runtime Properties
Union of environment and system properties available to scripts.
Setting Properties
Two ways to set properties:
Listing Properties
Property Substitution
Scripts and commands support variable substitution:
Syntax: ${propertyName} or ${propertyName, defaultValue}
Customizing Output
Transaction log entries can be displayed in various formats.
Tabular Format
Default textual table format.
Browse mode - Compact view showing relationships and transaction boundaries:
Query mode - Shows selected fields:
CSV Format
Enabled with -c option or when dumping to .csv file. Useful for:
Exporting to other tools
Viewing truncated data
Spreadsheet analysis
HTML Format
Output to .html file with dump command creates HTML table. Unlike tabular mode, strings aren't truncated.
Detailed (JSON) Format
Use -d flag to display entries in JSON format:
Control what's displayed with displayMetadata property:
On- Show metadata and object (default)Off- Show only objectOnly- Show only metadata
Filter unset fields with filterUnsetFields property:
JSON Style Formats
Control JSON formatting with jsonStyle property:
Default
Jackson default pretty printer (indented with 2 spaces)
Minimal
Single line, compact
SingleLine
Single line with spaces after colons
Custom
Custom PrettyPrinter class via nv.json.customPrettyPrinter property
Dates and Times
Timestamp Display
Timestamps are formatted using timestampFormat and timestampTZ properties.
View current settings:
Change settings:
Timestamp Input
TLT accepts timestamps in queries in multiple formats. See Querying Transaction Logs for detailed timestamp parsing information.
Running From Archives
The archive command bundles a log with the binaries needed to launch the tool into an executable jar, making it easy to analyze older archived logs.
Create archive:
Run archive:
Specify extraction location:
Archived contents will be extracted and opened automatically.
Common Commands
File Operations
open
Open transaction logs for browsing or querying.
Examples:
close
Close open logs and queries.
Examples:
switch
Switch between browse and query modes or between logs.
Examples:
list
List various objects (logs, types, indexes, commands, schema).
Examples:
Browsing Commands
next
Display next entries from log or query results.
Examples:
nexttxn
Display next application transaction (browse mode only).
skip
Skip entries or query results.
skiptxn
Skip transactions (browse mode only).
rewind
Reset to beginning of log or query results.
dump
Dump log contents or query results to console or file.
Examples:
tail
Tail entries in current log (browse mode only).
Examples:
stats
Display log file statistics (browse mode only).
Query Commands
SELECT / select
Execute SQL-like queries against open logs.
Examples:
See Querying Transaction Logs for comprehensive query syntax documentation.
CREATE / create
Create indexes on log fields for faster queries.
Examples:
DROP / drop
Drop an index.
Example:
DESCRIBE / describe
Describe fields for a given object type.
Examples:
SCHEMA / schema / PACKAGE / package
Set default package for resolving class references.
Examples:
COUNT / count
Get count of query results.
Analysis Commands
compare
Compare two logs.
Example:
rewrite / writelog
Rewrite query results as new transaction log.
WARNING: Recovering from a rewritten transaction log is inherently unsafe. Removing events from the recovery stream may result in an unrecoverable log or recovery with inconsistent state. Use extreme caution in production.
archive
Create executable jar archive of transaction logs.
Examples:
Factory Commands
factory
Register a factory with the Rumi runtime.
factories
Register multiple factories from a file.
Utility Commands
help
Display help information.
Examples:
script
Run a command script.
history
Display command history.
echo
Display a message or toggle echo setting.
ansi
Enable or disable ANSI output.
stacktraces
Toggle exception stacktrace display.
get
Get configuration or environment property.
set
Set configuration or environment property.
reset
Reset property to default value.
bye / exit / quit
Exit the tool.
Use Cases
Debugging Application Issues
Query logs to find problematic transactions:
Message Flow Tracing
Track message flow across applications:
Performance Analysis
Analyze transaction patterns and performance:
State Reconstruction
Rebuild and analyze application state:
Log Comparison
Compare logs from different environments or time periods:
Archiving for Analysis
Create portable archives for offline analysis:
Then share incident-2024-01-04.jar for analysis:
Prerequisites
Java 11+ (provided by Rumi CLI)
Access to transaction log files
For querying: Application's message/entity factory classes
Tips
Create indexes for frequently queried fields to improve performance
Use relative timestamps for quick queries:
'ten minutes ago'is easier than exact timestampsStart broad, refine - Begin with wide queries then add WHERE clauses to narrow results
Export results to CSV/HTML for sharing or further analysis in spreadsheet tools
Use scripts for repeatable analysis workflows
Set timestampFormat to match your preferred format for easier reading
Filter unset fields in JSON output for cleaner detailed views
Related Documentation
Querying Transaction Logs - Comprehensive query syntax and examples
Heartbeats Dump Tool (hbdump) - Extract and analyze heartbeat messages
Cloud Local Commands - Manage running applications
Last updated: 2025-01-04
Last updated

