tale-ndjson 0.2.1

A tail-compatible tool for pretty-printing ndjson files, especially logs.
Documentation
1
2
3
4
5
6
7
{"timestamp": "2025-08-01T09:15:00Z", "level": "INFO", "message": "Application startup initiated", "main_class": "com.example.Application"}
{"timestamp": "2025-08-01T09:15:01Z", "level": "DEBUG", "message": "Loading Spring context", "context_path": "/api/v1"}
{"timestamp": "2025-08-01T09:15:02Z", "level": "ERROR", "message": "Failed to initialize database connection\njava.sql.SQLException: Connection refused\n\tat java.sql.DriverManager.getConnection(DriverManager.java:664)\n\tat com.example.db.ConnectionPool.createConnection(ConnectionPool.java:45)\n\tat com.example.db.ConnectionPool.getConnection(ConnectionPool.java:23)\n\tat com.example.service.UserService.findById(UserService.java:156)\n\tat com.example.controller.UserController.getUser(UserController.java:89)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\nCaused by: java.net.ConnectException: Connection refused (Connection refused)\n\tat java.base/java.net.PlainSocketImpl.socketConnect(Native Method)\n\tat java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)\n\tat java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)", "database_url": "jdbc:postgresql://localhost:5432/myapp", "retry_count": 3}
{"timestamp": "2025-08-01T09:15:03Z", "level": "WARN", "message": "Falling back to in-memory cache", "cache_type": "redis_fallback"}
{"timestamp": "2025-08-01T09:15:04Z", "level": "INFO", "message": "REST endpoints registered", "endpoint_count": 15, "base_path": "/api/v1"}
{"timestamp": "2025-08-01T09:15:05Z", "level": "ERROR", "message": "Null pointer exception in user validation\njava.lang.NullPointerException: Cannot invoke \"String.trim()\" because \"email\" is null\n\tat com.example.validation.UserValidator.validateEmail(UserValidator.java:34)\n\tat com.example.validation.UserValidator.validate(UserValidator.java:18)\n\tat com.example.service.UserService.createUser(UserService.java:78)\n\tat com.example.controller.UserController.createUser(UserController.java:45)", "request_id": "req_789", "user_input": {"name": "John Doe", "email": null}}
{"timestamp": "2025-08-01T09:15:06Z", "level": "INFO", "message": "Application started successfully", "startup_time_ms": 6234}