Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 4f91559

Browse files
committed
updated README
1 parent ad9c084 commit 4f91559

10 files changed

+283
-12
lines changed

blogpost/datamask_example.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"correlationId" : "2660df70-a524-11ea-a34f-f01898696750",
3+
"message" : "Message received",
4+
"tracePoint" : "START",
5+
"priority" : "INFO",
6+
"elapsed" : 0,
7+
"locationInfo" : {
8+
"lineInFile" : "160",
9+
"component" : "json-logger:logger",
10+
"fileName" : "test-json-logger-basic.xml",
11+
"rootContainer" : "test-json-datamasking"
12+
},
13+
"timestamp" : "2020-06-02T22:55:26.991Z",
14+
"content" : {
15+
"payload" : {
16+
"balance" : "$1,611.66",
17+
"age" : 28,
18+
"name" : "Xxxxx Xxxxxxx",
19+
"gender" : "male",
20+
"company" : "SENTIA",
21+
"email" : "[email protected]",
22+
"phone" : "+* (***) ***-****",
23+
"addresses" : [ {
24+
"street_number" : "111",
25+
"street_name" : "Sesame st",
26+
"state" : "XX"
27+
}, {
28+
"street_number" : "***",
29+
"street_name" : "Xxxxxx xx",
30+
"state" : "XX"
31+
}, {
32+
"street_number" : "333",
33+
"street_name" : "Sesame st",
34+
"state" : "XX"
35+
} ]
36+
}
37+
},
38+
"applicationName" : "test-json-logger",
39+
"applicationVersion" : "1.0.0-SNAPSHOT",
40+
"environment" : "datamasking",
41+
"threadName" : "[MuleRuntime].uber.07: [test-json-logger].test-json-datamasking.BLOCKING @71ebeb62"
42+
}
43+
44+

blogpost/datamask_request.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"balance": "$1,611.66",
3+
"age": 28,
4+
"name": "Avila Padilla",
5+
"gender": "male",
6+
"company": "SENTIA",
7+
"email": "[email protected]",
8+
"phone": "+1 (935) 409-2876",
9+
"addresses": [{
10+
"street_number": "111",
11+
"street_name": "Sesame st",
12+
"state": "AA"
13+
},{
14+
"street_number": "222",
15+
"street_name": "Sesame st",
16+
"state": "BB"
17+
},{
18+
"street_number": "333",
19+
"street_name": "Sesame st",
20+
"state": "CC"
21+
}]
22+
}
23+
24+

blogpost/dw_request.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"isActive": false,
3+
"balance": "$1,611.66",
4+
"picture": "http://placehold.it/32x32",
5+
"age": 28,
6+
"eyeColor": "green",
7+
"name": "Avila Padilla",
8+
"gender": "male",
9+
"company": "SENTIA",
10+
"email": "[email protected]",
11+
"phone": "+1 (935) 409-2876",
12+
"address": "414 Jefferson Avenue, Trucksville, Mississippi, 5972"
13+
}
14+
15+

blogpost/dw_request_stringify.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"stringifyAny": "{\"isActive\": false,\"balance\": \"$1,611.66\",\"picture\": \"http://placehold.it/32x32\",\"age\": 28,\"eyeColor\": \"green\",\"name\": \"Avila Padilla\",\"gender\": \"male\",\"company\": \"SENTIA\",\"email\": \"[email protected]\",\"phone\": \"+1 (935) 409-2876\",\"address\": \"414 Jefferson Avenue, Trucksville, Mississippi, 5972\"}",
3+
"stringifyNonJSON": {
4+
"isActive": false,
5+
"balance": "$1,611.66",
6+
"picture": "http://placehold.it/32x32",
7+
"age": 28,
8+
"eyeColor": "green",
9+
"name": "Avila Padilla",
10+
"gender": "male",
11+
"company": "SENTIA",
12+
"email": "[email protected]",
13+
"phone": "+1 (935) 409-2876",
14+
"address": "414 Jefferson Avenue, Trucksville, Mississippi, 5972"
15+
},
16+
"stringifyAnyWithMetadata": {
17+
"data": "{\"isActive\": false,\"balance\": \"$1,611.66\",\"picture\": \"http://placehold.it/32x32\",\"age\": 28,\"eyeColor\": \"green\",\"name\": \"Avila Padilla\",\"gender\": \"male\",\"company\": \"SENTIA\",\"email\": \"[email protected]\",\"phone\": \"+1 (935) 409-2876\",\"address\": \"414 Jefferson Avenue, Trucksville, Mississippi, 5972\"}",
18+
"contentLength": 358,
19+
"dataType": "application/json"
20+
},
21+
"stringifyNonJSONWithMetadata": {
22+
"data": {
23+
"isActive": false,
24+
"balance": "$1,611.66",
25+
"picture": "http://placehold.it/32x32",
26+
"age": 28,
27+
"eyeColor": "green",
28+
"name": "Avila Padilla",
29+
"gender": "male",
30+
"company": "SENTIA",
31+
"email": "[email protected]",
32+
"phone": "+1 (935) 409-2876",
33+
"address": "414 Jefferson Avenue, Trucksville, Mississippi, 5972"
34+
},
35+
"contentLength": 358,
36+
"dataType": "application/json"
37+
}
38+
}
39+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[{
2+
"correlationId" : "2660df70-a524-11ea-a34f-f01898696750",
3+
"message" : "Message received 111",
4+
"tracePoint" : "START",
5+
"priority" : "INFO",
6+
"elapsed" : 0,
7+
"locationInfo" : {
8+
"lineInFile" : "160",
9+
"component" : "json-logger:logger",
10+
"fileName" : "test-json-logger-basic.xml",
11+
"rootContainer" : "test-json-datamasking"
12+
},
13+
"timestamp" : "2020-06-02T22:55:26.991Z",
14+
"content" : "some content",
15+
"applicationName" : "test-json-logger",
16+
"applicationVersion" : "1.0.0-SNAPSHOT",
17+
"environment" : "datamasking",
18+
"threadName" : "[MuleRuntime].uber.07: [test-json-logger].test-json-datamasking.BLOCKING @71ebeb62"
19+
},{
20+
"correlationId" : "2660df70-a524-11ea-a34f-f01898696750",
21+
"message" : "Message received 222",
22+
"tracePoint" : "END",
23+
"priority" : "INFO",
24+
"elapsed" : 10,
25+
"locationInfo" : {
26+
"lineInFile" : "160",
27+
"component" : "json-logger:logger",
28+
"fileName" : "test-json-logger-basic.xml",
29+
"rootContainer" : "test-json-datamasking"
30+
},
31+
"timestamp" : "2020-06-02T22:55:26.991Z",
32+
"content" : "some content",
33+
"applicationName" : "test-json-logger",
34+
"applicationVersion" : "1.0.0-SNAPSHOT",
35+
"environment" : "datamasking",
36+
"threadName" : "[MuleRuntime].uber.07: [test-json-logger].test-json-datamasking.BLOCKING @71ebeb62"
37+
}]
38+
39+
40+
41+
42+

blogpost/strigified_v1.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"applicationName" : "test-json-logger-old",
3+
"applicationVersion" : "1.0.0-SNAPSHOT",
4+
"content" : "{\n \"payload\": {\n \"_id\": \"5e9f57d7f7a3ddd837007857\",\n \"index\": 0,\n \"guid\": \"bab190b0-61a7-4937-a38f-dbf3ee6de808\",\n \"isActive\": false,\n \"balance\": \"$1,611.66\",\n \"picture\": \"http://placehold.it/32x32\",\n \"age\": 28,\n \"eyeColor\": \"green\",\n \"name\": \"Avila Padilla\",\n \"gender\": \"male\",\n \"company\": \"SENTIA\",\n \"email\": \"[email protected]\",\n \"phone\": \"+1 (935) 409-2876\",\n \"address\": \"414 Jefferson Avenue, Trucksville, Mississippi, 5972\",\n \"about\": \"Eu exercitation dolore reprehenderit excepteur ullamco aliquip. Excepteur elit officia dolor eu excepteur et sit non laborum duis id culpa reprehenderit. Non est cupidatat laborum occaecat ad esse consectetur cupidatat incididunt mollit. Officia Lorem nisi reprehenderit sint irure laboris incididunt nisi pariatur fugiat. Proident velit sit duis mollit incididunt labore sunt dolore non proident irure minim et reprehenderit.\\r\\n\",\n \"registered\": \"2014-05-26T02:45:32 +07:00\"\n }\n}",
5+
"correlationId" : "06316310-a1f9-11ea-8060-f01898696750",
6+
"elapsed" : "0",
7+
"environment" : "basic",
8+
"locationInfo" : {
9+
"component" : "json-logger:logger",
10+
"fileName" : "test-json-logger-basic.xml",
11+
"lineInFile" : "17",
12+
"location" : "test-json-basic/processors/0",
13+
"rootContainer" : "test-json-basic"
14+
},
15+
"message" : "Message received",
16+
"priority" : "INFO",
17+
"threadName" : "[MuleRuntime].uber.03: [test-json-logger-old].test-json-basic.BLOCKING @686dd234",
18+
"timestamp" : "2020-05-29T22:09:11.106Z",
19+
"tracePoint" : "START"
20+
}
21+
22+

blogpost/strigified_v2.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"correlationId" : "24c2e5f0-a1fa-11ea-8918-f01898696750",
3+
"message" : "Message received",
4+
"tracePoint" : "START",
5+
"priority" : "INFO",
6+
"elapsed" : 0,
7+
"locationInfo" : {
8+
"lineInFile" : "55",
9+
"component" : "json-logger:logger",
10+
"fileName" : "test-json-logger-basic.xml",
11+
"rootContainer" : "test-json-basic"
12+
},
13+
"timestamp" : "2020-05-29T22:17:11.930Z",
14+
"content" : {
15+
"payload" : {
16+
"_id" : "5e9f57d7f7a3ddd837007857",
17+
"index" : 0,
18+
"guid" : "bab190b0-61a7-4937-a38f-dbf3ee6de808",
19+
"isActive" : false,
20+
"balance" : "$1,611.66",
21+
"picture" : "http://placehold.it/32x32",
22+
"age" : 28,
23+
"eyeColor" : "green",
24+
"name" : "Avila Padilla",
25+
"gender" : "male",
26+
"company" : "SENTIA",
27+
"email" : "[email protected]",
28+
"phone" : "+1 (935) 409-2876",
29+
"address" : "414 Jefferson Avenue, Trucksville, Mississippi, 5972",
30+
"about" : "Eu exercitation dolore reprehenderit excepteur ullamco aliquip. Excepteur elit officia dolor eu excepteur et sit non laborum duis id culpa reprehenderit. Non est cupidatat laborum occaecat ad esse consectetur cupidatat incididunt mollit. Officia Lorem nisi reprehenderit sint irure laboris incididunt nisi pariatur fugiat. Proident velit sit duis mollit incididunt labore sunt dolore non proident irure minim et reprehenderit.\r\n",
31+
"registered" : "2014-05-26T02:45:32 +07:00"
32+
}
33+
},
34+
"applicationName" : "test-json-logger",
35+
"applicationVersion" : "1.0.0-SNAPSHOT",
36+
"environment" : "basic",
37+
"threadName" : "[MuleRuntime].uber.01: [test-json-logger].test-json-basic.BLOCKING @5c2c3628"
38+
}
39+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"correlationId" : "24c2e5f0-a1fa-11ea-8918-f01898696750",
3+
"message" : "Doing more stuff",
4+
"tracePoint" : "AFTER_TRANSFORM",
5+
"priority" : "INFO",
6+
"elapsed" : 344,
7+
"locationInfo" : {
8+
"lineInFile" : "95",
9+
"component" : "json-logger:logger",
10+
"fileName" : "test-json-logger-basic.xml",
11+
"rootContainer" : "test-json-basic"
12+
},
13+
"timestamp" : "2020-05-29T22:17:12.274Z",
14+
"content" : {
15+
"payload" : "<?xml version='1.0' encoding='UTF-8'?><rootXML><payload><_id>5e9f57d7f7a3ddd837007857</_id><index>0</index><guid>bab190b0-61a7-4937-a38f-dbf3ee6de808</guid><isActive>false</isActive><balance>$1,611.66</balance><picture>http://placehold.it/32x32</picture><age>28</age><eyeColor>green</eyeColor><name>Avila Padilla</name><gender>male</gender><company>SENTIA</company><email>[email protected]</email><phone>+1 (935) 409-2876</phone><address>414 Jefferson Avenue, Trucksville, Mississippi, 5972</address><about>Eu exercitation dolore reprehenderit excepteur ullamco aliquip. Excepteur elit officia dolor eu excepteur et sit non laborum duis id culpa reprehenderit. Non est cupidatat laborum occaecat ad esse consectetur cupidatat incididunt mollit. Officia Lorem nisi reprehenderit sint irure laboris incididunt nisi pariatur fugiat. Proident velit sit duis mollit incididunt labore sunt dolore non proident irure minim et reprehenderit.\n</about><registered>2014-05-26T02:45:32 +07:00</registered></payload></rootXML>"
16+
},
17+
"applicationName" : "test-json-logger",
18+
"applicationVersion" : "1.0.0-SNAPSHOT",
19+
"environment" : "basic",
20+
"threadName" : "[MuleRuntime].uber.01: [test-json-logger].test-json-basic.BLOCKING @5c2c3628"
21+
}
22+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"correlationId" : "8c2fe100-a1fc-11ea-9a08-f01898696750",
3+
"message" : "Message received",
4+
"tracePoint" : "START",
5+
"priority" : "INFO",
6+
"elapsed" : 0,
7+
"locationInfo" : {
8+
"lineInFile" : "55",
9+
"component" : "json-logger:logger",
10+
"fileName" : "test-json-logger-basic.xml",
11+
"rootContainer" : "test-json-basic"
12+
},
13+
"timestamp" : "2020-05-29T22:34:24.442Z",
14+
"content" : "{\n \"payload\": {\n \"_id\": \"5e9f57d7f7a3ddd837007857\",\n \"index\": 0,\n \"guid\": \"bab190b0-61a7-4937-a38f-dbf3ee6de808\",\n \"isActive\": false,\n \"balance\": \"$1,611.66\",\n \"picture\": \"http://placehold.it/32x32\",\n \"age\": 28,\n \"eyeColor\": \"green\",\n \"name\": \"Avila Padilla\",\n \"gender\": \"male\",\n \"company\": \"SENTIA\",\n \"email\": \"[email protected]\",\n \"phone\": \"+1 (935) 409-2876\",\n \"address\": \"414 Jefferson Avenue, Trucksville, Mississippi, 5972\",\n \"about\": \"Eu exercitation dolore reprehenderit excepteur ullamco aliquip. Excepteur elit officia dolor eu excepteur et sit non laborum duis id culpa reprehenderit. Non est cupidatat laborum occaecat ad esse consectetur cupidatat incididunt mollit. Officia Lorem nisi reprehenderit sint irure laboris incididunt nisi pariatur fugiat. Proident velit sit duis mollit incididunt labore sunt dolore non proident irure minim et reprehenderit.\\r\\n\",\n \"registered\": \"2014-05-26T02:45:32 +07:00\"\n }\n}",
15+
"applicationName" : "test-json-logger",
16+
"applicationVersion" : "1.0.0-SNAPSHOT",
17+
"environment" : "local",
18+
"threadName" : "[MuleRuntime].uber.01: [test-json-logger].test-json-basic.BLOCKING @3ed4a508"
19+
}
20+

json-logger/README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
# Json-logger Extension
22

3-
## 1.1.0 version - Release notes
3+
## 2.0.0 version - Release notes
4+
5+
New features:
6+
* External Destinations
7+
* Data masking
48

59
Improvements:
6-
* Removed Guava and caching in general with a more efficient handling of timers (for elapsed time)
7-
* Optimized generation of JSON output
8-
* Code optimizations
9-
* Minimized dependency footprint (down from ~23MB to ~3MB)
10-
* Optimized parsing of TypedValue content fields
10+
* Field ordering
11+
12+
More details in the coming blog post (stay tuned!)
13+
14+
## 1.1.0 version - Release notes
1115

1216
New features:
1317
* Scoped loggers to capture "scope bound elapsed time". Great for performance tracking of specific components (e.g. outbound calls)
1418
* Added "Parse content fields in json output" flag so that content fields can become part of final JSON output rather than a "stringified version" of the content
1519

16-
Add this dependency to your application pom.xml
20+
Improvements:
21+
* Removed Guava and caching in general with a more efficient handling of timers (for elapsed time)
22+
* Optimized generation of JSON output
23+
* Code optimizations
24+
* Minimized dependency footprint (down from ~23MB to ~13MB)
25+
* Optimized parsing of TypedValue content fields
1726

18-
```
19-
<groupId>YOUR_ORG_ID</groupId>
20-
<artifactId>json-logger</artifactId>
21-
<version>1.1.0-rc1</version>
22-
```

0 commit comments

Comments
 (0)