Module logi_layout_color

A logi_layout implementation which gives color to tty output messages.

Copyright © 2015-2016 Takeru Ohta <phjgt308@gmail.com>

Behaviours: logi_layout.

Description

A logi_layout implementation which gives color to tty output messages

Data Types

color_fun()

color_fun() = fun((logi_context:context()) -> iodata())

A function which returns ANSI escape code associated with given message context

Function Index

default_color/1Default color mapping function.
new/1Equivalent to new(BaseLayout, fun logi_layout_color:default_color/1).
new/2Creates a new layout instance.

Function Details

default_color/1

default_color(Context::logi_context:context()) -> iodata()

Default color mapping function

new/1

new(BaseLayout::logi_layout:layout()) -> logi_layout:layout()

Equivalent to new(BaseLayout, fun logi_layout_color:default_color/1).

new/2

new(BaseLayout::logi_layout:layout(), Color::color_fun()) -> logi_layout:layout()

Creates a new layout instance


Generated by EDoc, Sep 27 2018, 23:13:24.