enum Tabular::Log

Overview

A logger in which each member represents a logging level. Setting the $TABULAR_LOG_LEVEL environment variable from the shell to a file path directs all logging to that file.

Defined in:

tabular/log.cr

Enum Members

Fatal = 1

A serious error, indicating that the program itself may be unable to continue running.

Error = 2

Due to a more serious problem, the software has not been able to perform some function.

Warn = 3

An indication that something unexpected happened, or that a problem might occur in the near future.

Info = 4

Confirmation that things are working as expected.

Debug = 5

Detailed information, typically only of interest to a developer trying to diagnose a problem.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.level=(value : UInt32) #

Set the global logging level.


[View source]
def self.out(*msg) #

Send output to STDOUT.


[View source]
def self.silence #

Silence all output, for testing.


[View source]

Instance Method Detail

def debug? #

Returns true if this enum value equals Debug


[View source]
def error? #

Returns true if this enum value equals Error


[View source]
def fatal? #

Returns true if this enum value equals Fatal


[View source]
def info? #

Returns true if this enum value equals Info


[View source]
def send(msg) #

Send journald output to $TABULAR_LOG_FILE (defaults to File::NULL).


[View source]
def show(*msg) #

Send pretty output to $TABULAR_LOG_FILE (defaults to File::NULL).


[View source]
def warn? #

Returns true if this enum value equals Warn


[View source]