fast-logger-3.2.3: A fast logging system
Safe HaskellSafe-Inferred
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 #

isFDValid :: FD -> Bool Source #

data Builder #

Instances

Instances details
Monoid Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

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

sconcat :: NonEmpty Builder -> Builder

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

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
IsString LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

fromString :: String -> LogStr

Monoid LogStr Source # 
Instance details

Defined in System.Log.FastLogger.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

Show LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

showsPrec :: Int -> LogStr -> ShowS

show :: LogStr -> String

showList :: [LogStr] -> ShowS

ToLogStr LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Eq LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

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

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

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 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 Int8 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Int8 -> 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 Word8 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word8 -> 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 ByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: ByteString -> LogStr Source #

ToLogStr ShortByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: ShortByteString -> LogStr Source #

ToLogStr LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

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 String Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: String -> LogStr Source #

ToLogStr Integer Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Integer -> LogStr Source #

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 Word Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

Methods

toLogStr :: Word -> LogStr Source #

mempty :: Monoid a => a #

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

data SingleLogger Source #

A non-scale but time-ordered logger.

Instances

Instances details
Loggers SingleLogger Source # 
Instance details

Defined in System.Log.FastLogger.SingleLogger

data MultiLogger Source #

A scale but non-time-ordered logger.

Instances

Instances details
Loggers MultiLogger Source # 
Instance details

Defined in System.Log.FastLogger.MultiLogger

newMultiLogger :: Int -> BufSize -> IORef FD -> IO MultiLogger Source #

Creating MultiLogger. The first argument is the number of the internal builders.

writeLogStr :: Buffer -> IORef FD -> LogStr -> IO () Source #

Writting LogStr using a buffer in blocking mode. The size of LogStr must be smaller or equal to the size of buffer.

writeBigLogStr :: IORef FD -> LogStr -> IO () Source #

Writting LogStr using a temporary buffer.

class Loggers a where Source #

A class for internal loggers.

Methods

stopLoggers :: a -> IO () Source #

pushLog :: a -> LogStr -> IO () Source #

flushAllLog :: a -> IO () Source #

Instances

Instances details
Loggers MultiLogger Source # 
Instance details

Defined in System.Log.FastLogger.MultiLogger

Loggers SingleLogger Source # 
Instance details

Defined in System.Log.FastLogger.SingleLogger