From 00ad7b9a1c798e611a0c0b7fcbfa5ee76c2f39c4 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Tue, 14 Jan 2025 15:58:56 -0800 Subject: Adds minimal documentation --- hsm-core/Hsm/Core/Log.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hsm-core/Hsm/Core/Log.hs') diff --git a/hsm-core/Hsm/Core/Log.hs b/hsm-core/Hsm/Core/Log.hs index 9f1f357..9bf8b37 100644 --- a/hsm-core/Hsm/Core/Log.hs +++ b/hsm-core/Hsm/Core/Log.hs @@ -9,6 +9,8 @@ import Data.Time.Clock (getCurrentTime) import Effectful (Eff, (:>)) import Effectful.Log (Log, LogLevel, getLoggerIO, logMessage) +-- Helper function allows logging within IO, Useful during `resourcet` +-- allocation and release operations. withLogIO :: Log :> es => Eff es (LogLevel -> Text -> IO ()) withLogIO = do logIO <- getLoggerIO -- cgit v1.2.1