(image)

Programming Hotmoka
A tutorial on Hotmoka and smart contracts in Takamaka

8.3 Logs

The moka tool generates a hotmoka.log.* log file. Therefore, that file is generated also for the moka nodes commants that initialize or resume a Hotmoka node. In that case, the logs will report which transactions have been processed, together with potential errors.

The hotmoka.log file is normally rotated across successive or very long executions of moka. Therefore, look for files such as hotmoka.log.0 or hotmoka.log.1 to find the logs of the specific execution of moka that you are interested in.

The content of the logs, in the case of the execution of a Hotmoka node, might look like:

cat ~/hotmoka.log.0 | tail -10
[2026-03-15 13:07:58] [INFO ] 2fc7a2b8995eb9235fcc2fc3218833f66d7f64f33c0fd66452326a4bbcb68dab: delivering start -- [io.hotmoka.node.local.internal.AbstractStoreTransformationImpl deliverTransaction]
[2026-03-15 13:07:58] [INFO ] the gas cache has been updated since it might have changed: the new gas price is 75 -- [io.hotmoka.node.local.internal.AbstractStoreTransformationImpl updateCaches]
[2026-03-15 13:07:58] [INFO ] 2fc7a2b8995eb9235fcc2fc3218833f66d7f64f33c0fd66452326a4bbcb68dab: delivering success -- [io.hotmoka.node.local.internal.AbstractStoreTransformationImpl deliverTransaction]
[2026-03-15 13:07:58] [INFO ] coinbase: units of coin minted since the previous reward: 713470294182709052557 -- [io.hotmoka.node.disk.internal.DiskStoreTransformation deliverCoinbaseTransactions]
[2026-03-15 13:07:58] [INFO ] 2fc7a2b8995eb9235fcc2fc3218833f66d7f64f33c0fd66452326a4bbcb68dab#0: notified as event with creator 1dd0a47c000ffa1b4bbf49093e01846f743e9d21524465966d7891a0d466ac2f#e -- [io.hotmoka.node.local.internal.
AbstractLocalNodeImpl notifyEvent]
[2026-03-15 13:07:58] [INFO ] Started listener bound to [0.0.0.0:8001] -- [org.glassfish.grizzly.http.server.NetworkListener start]
[2026-03-15 13:07:58] [INFO ] [HttpServer-2] Started. -- [org.glassfish.grizzly.http.server.HttpServer start]
[2026-03-15 13:07:58] [INFO ] node service(ws://localhost:8001): published -- [io.hotmoka.node.service.internal.NodeServiceImpl <init>]
[2026-03-15 13:07:58] [INFO ] Stopped listener bound to [0.0.0.0:8001] -- [org.glassfish.grizzly.http.server.NetworkListener shutdownNow]
[2026-03-15 13:07:58] [INFO ] node service(ws://localhost:8001): closed -- [io.hotmoka.node.service.internal.NodeServiceImpl closeResources]

If you want to follow in real time what is happening inside your node, you can run for instance tail -f hotmoka.log.0: this will hang and print the new log entries as they are generated. Assuming that you have a local node running in your machine, try for instance in another shell to run moka nodes manifest show: you will see in the log all new entries related to the execution of the methods to access the information on the node printed by the last command.

Hotmoka nodes started with Docker disable the generation of the log files and dump logs to the standard output, where they can be accessed with the docker logs command. Therefore, they do not generate any hotmoka.log file. See next chapter for information.