From 3669428b539126b6d416c83e7dbfb9bf8471dc41 Mon Sep 17 00:00:00 2001 From: Bastien Teinturier <31281497+t-bast@users.noreply.github.com> Date: Mon, 3 May 2021 19:02:15 +0200 Subject: [PATCH] Don't log ClosingType object (#1781) It may contain a lot of data and pollute the logs. --- .../src/main/scala/fr/acinq/eclair/channel/Channel.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala b/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala index a26ae0c16b..dc031d5d97 100644 --- a/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala +++ b/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala @@ -32,6 +32,7 @@ import fr.acinq.eclair.channel.Monitoring.{Metrics, Tags} import fr.acinq.eclair.channel.TxPublisher.{PublishRawTx, PublishTx, SetChannelId, SignAndPublishTx} import fr.acinq.eclair.crypto.ShaChain import fr.acinq.eclair.crypto.keymanager.ChannelKeyManager +import fr.acinq.eclair.db.DbEventHandler.ChannelEvent.EventType import fr.acinq.eclair.db.PendingRelayDb import fr.acinq.eclair.db.pg.PgUtils.PgLock.logger import fr.acinq.eclair.io.Peer @@ -229,7 +230,7 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId case closing: DATA_CLOSING => // we don't put back the WatchSpent if the commitment tx has already been published and the spending tx already reached mindepth val closingType_opt = Closing.isClosingTypeAlreadyKnown(closing) - log.info(s"channel is closing (closingType=${closingType_opt.getOrElse("UnknownYet")})") + log.info(s"channel is closing (closingType=${closingType_opt.map(c => EventType.Closed(c).label).getOrElse("UnknownYet")})") // if the closing type is known: // - there is no need to watch the funding tx because it has already been spent and the spending tx has already reached mindepth // - there is no need to attempt to publish transactions for other type of closes