Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The contents of this module can change at any time without warning.
Synopsis
- type Buffer = Ptr Word8
- type BufSize = Int
- defaultBufSize :: BufSize
- getBuffer :: BufSize -> IO Buffer
- freeBuffer :: Buffer -> IO ()
- toBufIOWith :: Buffer -> BufSize -> ( Buffer -> Int -> IO ()) -> Builder -> IO ()
- type FD = FD
- closeFD :: FD -> IO ()
- openFileFD :: FilePath -> IO FD
- getStderrFD :: IO FD
- getStdoutFD :: IO FD
- writeRawBufferPtr2FD :: IORef FD -> Ptr Word8 -> Int -> IO Int
- invalidFD :: FD
- isFDValid :: FD -> Bool
- data Builder
- data LogStr = LogStr ! Int Builder
- logStrLength :: LogStr -> Int
- fromLogStr :: LogStr -> ByteString
- class ToLogStr msg where
- mempty :: Monoid a => a
- (<>) :: Semigroup a => a -> a -> a
- newtype Logger = Logger ( IORef LogStr )
- newLogger :: IO Logger
- pushLog :: IORef FD -> BufSize -> MVar Buffer -> Logger -> LogStr -> IO ()
- flushLog :: IORef FD -> BufSize -> MVar Buffer -> Logger -> IO ()
- module System.Log.FastLogger.LoggerSet
Documentation
defaultBufSize :: BufSize Source #
The default buffer size (4,096 bytes).
freeBuffer :: Buffer -> IO () Source #
getStderrFD :: IO FD Source #
getStdoutFD :: IO FD Source #
Builder
s denote sequences of bytes.
They are
Monoid
s where
mempty
is the zero-length sequence and
mappend
is concatenation, which runs in
O(1)
.
Log message builder. Use (
<>
) to append two LogStr in O(1).
fromLogStr :: LogStr -> ByteString Source #
Converting
LogStr
to
ByteString
.
class ToLogStr msg where Source #
Types that can be converted to a
LogStr
. Instances for
types from the
text
library use a UTF-8 encoding. Instances
for numerical types use a decimal encoding.
Instances
ToLogStr Double Source # |
Since: 2.4.14 |
ToLogStr Float Source # |
Since: 2.4.14 |
ToLogStr Int Source # |
Since: 2.4.14 |
ToLogStr Int8 Source # |
Since: 2.4.14 |
ToLogStr Int16 Source # |
Since: 2.4.14 |
ToLogStr Int32 Source # |
Since: 2.4.14 |
ToLogStr Int64 Source # |
Since: 2.4.14 |
ToLogStr Integer Source # |
Since: 2.4.14 |
ToLogStr Word Source # |
Since: 2.4.14 |
ToLogStr Word8 Source # |
Since: 2.4.14 |
ToLogStr Word16 Source # |
Since: 2.4.14 |
ToLogStr Word32 Source # |
Since: 2.4.14 |
ToLogStr Word64 Source # |
Since: 2.4.14 |
ToLogStr String Source # | |
ToLogStr ShortByteString Source # | |
Defined in System.Log.FastLogger.LogStr toLogStr :: ShortByteString -> LogStr Source # |
|
ToLogStr ByteString Source # | |
Defined in System.Log.FastLogger.LogStr toLogStr :: ByteString -> LogStr Source # |
|
ToLogStr ByteString Source # | |
Defined in System.Log.FastLogger.LogStr toLogStr :: ByteString -> LogStr Source # |
|
ToLogStr Builder Source # | |
ToLogStr Text Source # | |
ToLogStr Text Source # | |
ToLogStr LogStr Source # | |