feat: pretify_log utilit
This commit is contained in:
20
package/prettify-log/test/fixture/test.log
Normal file
20
package/prettify-log/test/fixture/test.log
Normal file
@@ -0,0 +1,20 @@
|
||||
Debug: respons {"some": "name", "value": 12} is received
|
||||
{timespan} Info: some log without json
|
||||
Error: {"error": "Something went wrong", "code": 500}
|
||||
Warning: Invalid data format detected
|
||||
{"status": "ok", "data": {"id": 1, "name": "test"}}
|
||||
User log: {"user": "john_doe", "action": "login", "timestamp": "2025-01-31T12:00:00Z"}
|
||||
Random text without json
|
||||
Debug: Payload sent: {"request": {"type": "POST", "body": {"key": "value"}}}
|
||||
Another line with no json
|
||||
{meta} Log: {"action": "update", "success": true}
|
||||
Normal message with {"json": "inside"} text
|
||||
{"nested": {"deep": {"value": "found"}}, "array": [1,2,3]}
|
||||
{2025-01-31} Event: {"event": "created", "user": "admin"}
|
||||
Plain text that should not be modified
|
||||
Info: {"level": "info", "details": "this is a test log"}
|
||||
{"array": [{"id": 1}, {"id": 2}, {"id": 3}]}
|
||||
An unformatted json log {"name":"example","valid":true}
|
||||
Debug: {"data": "test", "items": [{"x": 10, "y": 20}]}
|
||||
Non-json message with curly braces {like this}
|
||||
{"key1": "value1", "key2": {"subkey": "subvalue"}}
|
||||
Reference in New Issue
Block a user