Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 5326cea

Browse files
committed
[CBR-275] cleanup interface required for structured logging
Signed-off-by: Alexander Diemand <[email protected]>
1 parent 3e76205 commit 5326cea

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

auxx/src/Command/Update.hs

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import Pos.Crypto (Hash, ProtocolMagic, emptyPassphrase, hash,
2727
hashHexF, unsafeHash, withSafeSigner, withSafeSigners)
2828
import Pos.Infra.Diffusion.Types (Diffusion (..))
2929
import Pos.Network.Update.Download (installerHash)
30-
import Pos.Util.Wlog (CanLog, HasLoggerName, logDebug, logError,
31-
logInfo)
30+
import Pos.Util.Wlog (WithLogger, logDebug, logError, logInfo)
3231

3332
import Lang.Value (ProposeUpdateParams (..), ProposeUpdateSystem (..))
3433
import Mode (MonadAuxxMode)
@@ -105,7 +104,7 @@ updateDataElement ProposeUpdateSystem{..} = do
105104
dummyHash :: Hash Raw
106105
dummyHash = unsafeHash (0 :: Integer)
107106

108-
hashFile :: (CanLog m, HasLoggerName m, MonadIO m) => Maybe FilePath -> m (Hash Raw)
107+
hashFile :: (WithLogger m, MonadIO m) => Maybe FilePath -> m (Hash Raw)
109108
hashFile Nothing = pure dummyHash
110109
hashFile (Just filename) = do
111110
fileData <- liftIO $ BSL.readFile filename

wallet/src/Pos/Wallet/Web/Tracking/Sync.hs

+4-5
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ import Pos.Infra.Util.LogSafe (buildSafe, logDebugSP, logErrorSP,
8080
import qualified Pos.Util.Modifier as MM
8181
import Pos.Util.Servant (encodeCType)
8282
import Pos.Util.Util (HasLens (..), getKeys, timed)
83-
import Pos.Util.Wlog (CanLog, HasLoggerName, WithLogger, logDebug,
84-
logError, logInfo, logWarning, modifyLoggerName)
83+
import Pos.Util.Wlog (HasLoggerName, WithLogger, logDebug, logError,
84+
logInfo, logWarning, modifyLoggerName)
8585

8686
import Pos.Wallet.Web.ClientTypes (CId, CTxMeta (..), Wal)
8787
import Pos.Wallet.Web.Error.Types (WalletError (..))
@@ -734,8 +734,7 @@ calculateEstimatedRemainingTime (WS.SyncThroughput blocks) remainingBlocks =
734734

735735
-- | Apply the given 'CAccModifier' to a wallet.
736736
applyModifierToWallet
737-
:: ( CanLog m
738-
, HasLoggerName m
737+
:: ( WithLogger m
739738
, MonadIO m
740739
)
741740
=> WalletDB
@@ -773,7 +772,7 @@ applyModifierToWallet db trackingOperation wid newBlockHeaderTip CAccModifier{..
773772
newSyncState
774773

775774
rollbackModifierFromWallet
776-
:: (CanLog m, HasLoggerName m, MonadSlots ctx m)
775+
:: (WithLogger m, MonadSlots ctx m)
777776
=> ProtocolConstants
778777
-> WalletDB
779778
-> TrackingOperation

0 commit comments

Comments
 (0)