# Help with log4j netty configuration in sandbox

**URL:** <https://forum.canton.network/t/help-with-log4j-netty-configuration-in-sandbox/6284>\
**Category:** App Development\
**Tags:** canton\
**Created:** [March 16, 2023, 7:46am UTC](https://forum.canton.network/t/help-with-log4j-netty-configuration-in-sandbox/6284 "2023-03-16T07:46:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luciano](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/luciano/32/319_2.png) [@Luciano](https://forum.canton.network/u/Luciano)\
**Post date:** [March 16, 2023, 7:46am UTC](https://forum.canton.network/t/help-with-log4j-netty-configuration-in-sandbox/6284/1 "2023-03-16T07:46:33Z")

</div>

I’m trying to set up TLS on the sandbox, and as per the suggestion [in our documentation](https://docs.daml.com/canton/usermanual/apis.html#tls-configuration), I would like to enable logging in Netty to debug the connection.

I’ve followed the instructions in the [log4j documentation](https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration), and created a config file `log4j2.xml` in the root directory of my application, like this:

```xml
<?xml version="1.0" encoding="UTF-8"?>;
<Configuration>
  <Loggers>
    <Logger name="io.netty" level="debug">
      <AppenderRef ref="Console"/>
    </Logger>
  </Loggers>
</Configuration>

```

I’ve tried some different combinations of this. But I get a feeling the file isn’t being read by canton at all, when I run `daml start`. Can someone help me?

---

<div class="post-metadata">

**Author:** ![Luciano](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/luciano/32/319_2.png) [@Luciano](https://forum.canton.network/u/Luciano)\
**Post date:** [March 16, 2023, 7:57am UTC](https://forum.canton.network/t/help-with-log4j-netty-configuration-in-sandbox/6284/2 "2023-03-16T07:57:19Z")

</div>

As per @Remy 's comment [here](https://discuss.daml.com/t/logs-in-canton-nodes-domain/5562/2), I’ve enabled DEBUG at the root level on the command line, and I can see error messages such as:

```haskell
2023-03-16 09:54:37,958 [grpc-nio-worker-ELG-3-5] DEBUG io.grpc.netty.NettyServerHandler 

```

So perhaps It’s just the logger name that is incorrect (i.e. `io.grpc.netty` instead of `io.netty`) [edit: no, that didn’t help]

---

<div class="post-metadata">

**Author:** ![stefanobaghino-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stefanobaghino-da/32/7057_2.png) [@stefanobaghino-da](https://forum.canton.network/u/stefanobaghino-da)\
**Post date:** [March 17, 2023, 12:55pm UTC](https://forum.canton.network/t/help-with-log4j-netty-configuration-in-sandbox/6284/3 "2023-03-17T12:55:26Z")

</div>

Canton uses Slf4j and Logback, not Log4j, so I don’t think you can use that to configure the logging. If you want to point at a custom configuration file [this](https://discuss.daml.com/t/using-a-custom-logback-xml-for-the-sandbox/154) post might come in handy.

Alternatively you can (temporarily) touch up the logging configuration files store in the `$HOME/.daml` directory.
