aboutsummaryrefslogtreecommitdiff
path: root/hsm-core/Hsm/Core/Log.hs
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2025-01-14 15:58:56 -0800
committerPaul Oliver <contact@pauloliver.dev>2025-01-24 16:34:31 -0800
commit7c360b79ee2e3230e6e5fe76c102dd688f9cf7b9 (patch)
tree6ab893160c4d50a09d24f593a5dd4541efa1c43a /hsm-core/Hsm/Core/Log.hs
parentdd9aa4a851829c792fc034d3169ef7e90ea899b4 (diff)
Adds minimal documentation
Diffstat (limited to 'hsm-core/Hsm/Core/Log.hs')
-rw-r--r--hsm-core/Hsm/Core/Log.hs2
1 files changed, 2 insertions, 0 deletions
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