fast-logger-0.0.0: A fast logging system

System.Log.FastLogger

Contents

Description

Fast logging system to copy log data directly to Handle buffer.

Synopsis

Initialization

initHandle :: Handle -> IO ()Source

Setting a proper buffering to Handle.

Logging

data LogStr Source

A date type to contain String and ByteString. This data is exported so that format can be defined. This would be replaced with Builder someday when it can be written directly to Handle buffer.

Constructors

LS !String 
LB !ByteString 

hPutLogStr :: Handle -> [LogStr] -> IO ()Source

The hPut function to copy a list of LogStr to the buffer of Handle directly. If Handle is associated with a file, AppendMode must be used.

Builder

hPutBuilder :: Handle -> Builder -> IO ()Source

The hPut function directory to copy Builder to the buffer. If Handle is associated with a file, AppendMode must be used. The current implementation is inefficient at this moment. initHandle must be called once beforehand if this function is used. This would replace hPutLogStr someday.

File rotation