1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-19 09:54:02 +01:00
eclair/docs/Logging.md
Richard Myers 553727cb22
Convert wiki pages in to files in the docs directory and general docs file cleanups (#2165)
Created new files for pages that were in the wiki, but not already in the docs directory. Also made following fixes to  README.md and existing files in the docs directory:

* update bolt links to avoid redirect
* link to logging guide from logging section (README.md)
* fixed typo in Backup section and capitalization of Bitcoin Core (README.md)
* Alice does not need trampoline feature enabled (TrampolinePayments.md)
* link to 2021 edition of Trampoline PR (TrampolinePayments.md)
* fixed API examples and removed quotes from password (API.md)
* use --nodeIds for sendtoroute examples (TrampolinePayments.md and MultipartPayments.md)
* update CLI example 3 to use jq (Usage.md)
* fix typo in docs/FAQ.md
* updated Guide.md to point to all pages that are guides
2022-02-06 20:28:50 +01:00

2.0 KiB

Logging

Customize Logging

Eclair uses logback for logging. By default the logging level is set to INFO for the whole application. To use a different configuration, and override the internal logback.xml, run:

eclair-node.sh -Dlogback.configurationFile=/path/to/logback-custom.xml

If you want parts of the application to log at the DEBUG logging level, you will also need to override akka.loglevel:

eclair-node.sh -Dakka.loglevel=DEBUG -Dlogback.configurationFile=/path/to/logback-custom.xml

You can find the default logback.xml file here. It logs everything more serious than INFO to a rolling file.

If you want to debug an issue, you can change the root logger's log level to DEBUG:

<root level="DEBUG">
    <appender-ref ref="ROLLING"/>
</root>

This setting will produce a lot of logs. If you are investigating an issue with payments, you can instead turn on DEBUG logging only for payments-related components by adding a new logger before the root:

<logger name="fr.acinq.eclair.payment" level="DEBUG"/>

<root level="INFO">
    <appender-ref ref="ROLLING"/>
</root>

On the contrary, if you want a component to emit less logs, you can set its log level to WARN or ERROR:

<logger name="fr.acinq.eclair.router" level="WARN"/>

<root level="INFO">
    <appender-ref ref="ROLLING"/>
</root>

To figure out the name you should use for the logger element, you need to look at the hierarchy of the source code in Eclair's Github repository. You can even configure loggers for each specific class you're interested in:

<logger name="fr.acinq.eclair.router" level="WARN"/>
<logger name="fr.acinq.eclair.crypto.Sphinx" level="DEBUG"/>

<root level="INFO">
    <appender-ref ref="ROLLING"/>
</root>

For more advanced use-cases, please see logback's official documentation.