on 56d7dac help sign in
23 lines 660 B history raw
1-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
2-- SPDX-License-Identifier: Apache-2.0
4{-# LANGUAGE RankNTypes #-}
5-- | This is a compatibility module that abstracts over the
6-- concrete choice of logging framework so users can plug in whatever
7-- framework they want to.
8module Development.IDE.Logger
9 ( Handle(..)
10 , makeNopHandle
11 ) where
13import qualified Data.Text as T
14import GHC.Stack
16data Handle = Handle {
17 logSeriousError :: HasCallStack => T.Text -> IO ()
18 , logDebug :: HasCallStack => T.Text -> IO ()
19 }
21makeNopHandle :: Handle
22makeNopHandle = Handle e e where
23 e _ = pure ()