# Json-api logging with actual json message

**URL:** <https://forum.canton.network/t/json-api-logging-with-actual-json-message/4154>\
**Category:** App Development\
**Tags:** logfile, json-api\
**Created:** [March 18, 2022, 5:53pm UTC](https://forum.canton.network/t/json-api-logging-with-actual-json-message/4154 "2022-03-18T17:53:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartcant](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bartcant/32/823_2.png) [@bartcant](https://forum.canton.network/u/bartcant)\
**Post date:** [March 18, 2022, 5:53pm UTC](https://forum.canton.network/t/json-api-logging-with-actual-json-message/4154/1 "2022-03-18T17:53:08Z")

</div>

I am troubleshooting a specific customer issue and like to monitor and log the actual json-api messages at the server

Currently the format of the json-api output is defined by the json-api-logback.xml

```haskell
<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <!-- encoders are assigned the type
             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <logger name="io.netty" level="WARN" />
    <logger name="io.grpc.netty" level="WARN" />
    <logger name="ch.qos.logback" level="WARN" />

    <root level="INFO">
        <appender-ref ref="STDOUT" />
    </root>
</configuration>

```

Can this be configured to contain the actual json-api message ?

I am using DAML JDK 1.13.1

---

<div class="post-metadata">

**Author:** ![bartcant](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bartcant/32/823_2.png) [@bartcant](https://forum.canton.network/u/bartcant)\
**Post date:** [March 18, 2022, 7:45pm UTC](https://forum.canton.network/t/json-api-logging-with-actual-json-message/4154/2 "2022-03-18T19:45:58Z")

</div>

Maybe the

> –log-encoder json

argument is solution ? or is this just a conversion of the text logfiles in a json format ?

In which version of the json-api is this supported ? It appears not available in DAML SDK 1.13.1

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)\
**Post date:** [March 21, 2022, 3:59pm UTC](https://forum.canton.network/t/json-api-logging-with-actual-json-message/4154/3 "2022-03-21T15:59:04Z")

</div>

As you suspect, `--log-encoder json` just changes the format of the log output itself.

Some contents of requests are encoded at `--log-level DEBUG`; however, nothing logs the contents of every request or response. For that, I would suggest looking to the options of whatever reverse proxy you have set up in front of JSON API.
