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

data Builder #

Builders denote sequences of bytes. They are Monoids where mempty is the zero-length sequence and mappend is concatenation, which runs in O(1).

Instances

Instances details
Monoid Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup 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
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

Show LogStr Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

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.

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

ToLogStr Int32 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr Int64 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

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

ToLogStr Word32 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr Word64 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr Word8 Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr Builder Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr ByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr ByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr ShortByteString Source # 
Instance details

Defined in System.Log.FastLogger.LogStr

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

ToLogStr Integer Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr Double Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

ToLogStr Float Source #

Since: 2.4.14

Instance details

Defined in System.Log.FastLogger.LogStr

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 #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

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

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

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 #