Core

Namespace: Peeps

View source

Records

PeepsSettings

A record represent Peeps general settings

Fields

Name Type

OutputDirectory

string

PeepsLogItem

A log item used in Peeps.

Fields

Name Type

TimeUtc

DateTime

From

string

Message

string

ItemType

LogItemType

Methods

Name Details

Create

'a * string * string -> PeepsLogItem

Create a new log item.

level : 'a

A Microsoft.Extensions.Logging.LogLevel.

from : string

The name of item producer.

message : string

The message to be logged.

Returns

A new PeepsLogItem.

Rendered

unit -> string

Render a log item for display on Unix systems.

Returns

The rendered item message.

Timestamp

unit -> int64

Get the item's timestamp.

Returns

The item's timestamp as a int64.

Unions

PeepsConsoleColor

Various console colors. Mainly for use on Linux, Windows doesn't work well with escape codes

Union cases

Name Type

Black

PeepsConsoleColor

BrightBlack

PeepsConsoleColor

Red

PeepsConsoleColor

BrightRed

PeepsConsoleColor

Green

PeepsConsoleColor

BrightGreen

PeepsConsoleColor

Yellow

PeepsConsoleColor

BrightYellow

PeepsConsoleColor

Blue

PeepsConsoleColor

BrightBlue

PeepsConsoleColor

Magenta

PeepsConsoleColor

BrightMagenta

PeepsConsoleColor

Cyan

PeepsConsoleColor

BrightCyan

PeepsConsoleColor

White

PeepsConsoleColor

BrightWhite

PeepsConsoleColor

Custom

PeepsConsoleColor

Reset

PeepsConsoleColor

Methods

Name Details

ForegroundText

string -> string

Create a string to with a foreground color. For us on Linux.

text : string

Returns

A string with the text and escape codes.

Background

unit -> string

Get the escape code to set the console background color. For use on Linux.

Returns

A string representing the escape code.

Foreground

unit -> string

Get the escape code to set the console foreground color. For use on Linux.

Returns

A string representing the escape code.

LogItemType

Peep log item types, these represent log item levels.

Union cases

Name Type

Information

LogItemType

Debug

LogItemType

Trace

LogItemType

Error

LogItemType

Warning

LogItemType

Critical

LogItemType

Methods

Name Details

FromLogLevel

'a -> 'b

Create a LogItemType from a LogLevel

level : 'a

A Microsoft.Extensions.Logging.LogLevel.

Returns

A LogItemType matching the level.

Serialize

unit -> string

Serialize the item type to a string.

Returns

A string representing the item type.

ConsoleColor

unit -> PeepsConsoleColor

Get the PeepsConsoleColor associated with a LogItemType.

Returns

A PeepsConsoleColor.

Modules

Generated on 17 July 2022 at 22:50:26 with FXD (version 0.1.0).