fast-logger-3.0.1: A fast logging system
Safe HaskellSafe
LanguageHaskell2010

System.Log.FastLogger.Internal

Description

The contents of this module can change at any time without warning.

Synopsis

Documentation

type Buffer = Ptr Word8 Source #

type BufSize = Int Source #

The type for buffer size of each core.

defaultBufSize :: BufSize Source #

The default buffer size (4,096 bytes).

toBufIOWith :: Buffer -> BufSize -> (Buffer -> Int -> IO ()) -> Builder -> IO () Source #

type FD = FD Source #

closeFD :: FD -> IO () Source #

writeRawBufferPtr2FD :: IORef FD -> Ptr Word8 -> Int -> IO Int Source #

data Builder #

Instances

Instances details
Semigroup Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

(<>) :: Builder -> Builder -> Builder #

sconcat :: NonEmpty Builder -> Builder

stimes :: Integral b => b -> Builder -> Builder

Monoid Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

ToLogStr Builder Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

data LogStr Source #

Log message builder. Use (<>) to append two LogStr in O(1).

Constructors

LogStr !Int Builder 

Instances

Instances details
Eq LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

(==) :: LogStr -> LogStr -> Bool

(/=) :: LogStr -> LogStr -> Bool

Show LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

showsPrec :: Int -> LogStr -> ShowS

show :: LogStr -> String

showList :: [LogStr] -> ShowS

IsString LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

fromString :: String -> LogStr

Semigroup LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

(<>) :: LogStr -> LogStr -> LogStr #

sconcat :: NonEmpty LogStr -> LogStr

stimes :: Integral b => b -> LogStr -> LogStr

Monoid LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

logStrLength :: LogStr -> Int Source #

Obtaining the length of LogStr.

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.

Methods

toLogStr :: msg -> LogStr Source #

Instances

Instances details
ToLogStr Double Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Double -> LogStr Source #

ToLogStr Float Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Float -> LogStr Source #

ToLogStr Int Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int -> LogStr Source #

ToLogStr Int8 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int8 -> LogStr Source #

ToLogStr Int16 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int16 -> LogStr Source #

ToLogStr Int32 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int32 -> LogStr Source #

ToLogStr Int64 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int64 -> LogStr Source #

ToLogStr Integer Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Integer -> LogStr Source #

ToLogStr Word Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word -> LogStr Source #

ToLogStr Word8 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word8 -> LogStr Source #

ToLogStr Word16 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word16 -> LogStr Source #

ToLogStr Word32 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word32 -> LogStr Source #

ToLogStr Word64 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word64 -> LogStr Source #

ToLogStr String Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: String -> LogStr Source #

ToLogStr ByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: ByteString -> LogStr Source #

ToLogStr Builder Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr ByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: ByteString -> LogStr Source #

ToLogStr Text Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Text -> LogStr Source #

ToLogStr Text Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Text -> LogStr Source #

ToLogStr LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

mempty :: Monoid a => a #

(<>) :: Semigroup a => a -> a -> a #

data Logger Source #

Constructors

Logger !BufSize (MVar Buffer) (IORef LogStr) 

pushLog :: IORef FD -> Logger -> LogStr -> IO () Source #

flushLog :: IORef FD -> Logger -> IO () Source #