10import Effect.Class (liftEffect)
11import Yoga.Logger (Logger)
12import Yoga.Logger as Logger
13import Prim.Row (class Lacks)
14import Record as Record
15import Type.Proxy (Proxy(..))
16import Unsafe.Coerce (unsafeCoerce)
19-- Helper to convert record to Object String
20recordToObjectString :: forall r. Record r -> Logger.LogContext
21recordToObjectString = unsafeCoerce
23-- Om-specific logging functions that use the unified Logger interface
24logInfo :: forall ctx logCtx err. Lacks "body" logCtx => String -> { | logCtx } -> Om.Om { logger :: Logger | ctx } err Unit
25logInfo message logCtx = do
27 let ctxWithBody = Record.insert (Proxy :: Proxy "body") message logCtx
28 liftEffect $ Logger.logInfo logger message (recordToObjectString ctxWithBody)
30logDebug :: forall ctx logCtx err. Lacks "body" logCtx => String -> { | logCtx } -> Om.Om { logger :: Logger | ctx } err Unit
31logDebug message logCtx = do
33 let ctxWithBody = Record.insert (Proxy :: Proxy "body") message logCtx
34 liftEffect $ Logger.logDebug logger message (recordToObjectString ctxWithBody)
36logWarn :: forall ctx logCtx err. Lacks "body" logCtx => String -> { | logCtx } -> Om.Om { logger :: Logger | ctx } err Unit
37logWarn message logCtx = do
39 let ctxWithBody = Record.insert (Proxy :: Proxy "body") message logCtx
40 liftEffect $ Logger.logWarn logger message (recordToObjectString ctxWithBody)
42logError :: forall ctx logCtx err. Lacks "body" logCtx => String -> { | logCtx } -> Om.Om { logger :: Logger | ctx } err Unit
43logError message logCtx = do
45 let ctxWithBody = Record.insert (Proxy :: Proxy "body") message logCtx
46 liftEffect $ Logger.logError logger message (recordToObjectString ctxWithBody)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list