fast-logger-2.4.10: A fast logging system

Safe Haskell | None
Language | Haskell98

System.Log.FastLogger.Date

Contents

- Types
- Date cacher

Description

Formatting time is slow. This package provides mechanisms to cache formatted date.

Synopsis

- type TimeFormat = ByteString
- type FormattedTime = ByteString
- newTimeCache :: TimeFormat -> IO (IO FormattedTime)
- simpleTimeFormat :: TimeFormat
- simpleTimeFormat' :: TimeFormat

# Types

type TimeFormat = ByteString #

type FormattedTime = ByteString #

Type aliaes for date format and formatted date.

# Date cacher

newTimeCache :: TimeFormat -> IO (IO FormattedTime) #

Make `IO` action which get cached formatted local time. Use this to avoid the cost of frequently time formatting by caching an auto updating formatted time, this cache update every 1 second. more detail in Control.AutoUpdate

simpleTimeFormat :: TimeFormat #

A simple time cache using format `"%d%b%Y:%T %z"`

simpleTimeFormat' :: TimeFormat #

A simple time cache using format `"%d-%b-%Y %T"`