You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to have multiple log subscribers running simultaneously, if several log subscribers were created then each of them will be writing the same log lines.
587
+
588
+
### Request to create new log subscriber in Json format
589
+
590
+
```json
591
+
{
592
+
"action": "create_log_subscriber",
593
+
"params": {
594
+
"type": "console_json",
595
+
"name": "JsonLogSubscriber",
596
+
"autosubscribe": "INFO",
597
+
"tags": {
598
+
"ddtags": "env:test",
599
+
"service": "my-application-name"
600
+
}
601
+
}
602
+
}
603
+
```
604
+
605
+
### Example Response
606
+
607
+
```json
608
+
{
609
+
"feedback": {},
610
+
"result": 0
611
+
}
612
+
```
613
+
614
+
This will write logs to standard output in Json format. If you need to add extra static fields to tag logs then you can add them into `tags`, in this example `ddtags` and `service` are added.
615
+
This configuration will produce logs similar to these:
616
+
617
+
```json
618
+
{"node":"TaskQueue","level":"INFO","ddtags":"env:test","service":"my-application-name","message":"Rescheduling running tasks for expired XAS instance '169a16c5-a748-4e21-8efa-3a6057a14d8a'.","timestamp":1734629114040}
619
+
{"node":"Core","level":"INFO","ddtags":"env:test","service":"my-application-name","message":"Mendix Runtime is now shut down.","timestamp":1734629114260}
620
+
```
621
+
622
+
### Request to create new log subscriber in simple text format
623
+
624
+
```json
625
+
{
626
+
"action": "create_log_subscriber",
627
+
"params": {
628
+
"type": "console",
629
+
"name": "SimpleTextLogSubscriber",
630
+
"autosubscribe": "INFO"
631
+
}
632
+
}
633
+
```
634
+
635
+
### Example Response
636
+
637
+
```json
638
+
{
639
+
"feedback": {},
640
+
"result": 0
641
+
}
642
+
```
643
+
644
+
This will write logs to standard output in simple text format.
0 commit comments