Module logs

logs
Version:
0.0.1
License:
MIT
Dependencies from vmod:
2
Imports:
1
Imported by:
5
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

  • srackham.pcre2
  • markdown

Imports

  • Standard Library

Aliases

This section is empty.

Constants

#constant support_colors

pub const support_colors = term.can_show_color_on_stderr() && term.can_show_color_on_stdout()

Sum types

This section is empty.

Functions

#fn get_color_mode_by_name

fn get_color_mode_by_name(name string) ?ColorMode

Structs

#struct Logger

pub struct Logger {
mut:
	disabled   bool
	color_mode ColorMode
}

#fn (&Logger) disable

inline
fn (mut l &Logger) disable()

#fn (&Logger) enable

inline
fn (mut l &Logger) enable()

#fn (&Logger) use_color_mode

inline
fn (mut l &Logger) use_color_mode(mode ColorMode)

#fn (Logger) success

inline
fn (l Logger) success(msg string)

#fn (Logger) info

inline
fn (l Logger) info(msg string)

#fn (Logger) warning

inline
fn (l Logger) warning(msg string)

#fn (Logger) error

inline
fn (l Logger) error(msg string)

#fn (Logger) yellow

inline
fn (l Logger) yellow(msg string)

#fn (Logger) gray

inline
fn (l Logger) gray(msg string)

#fn (Logger) red

inline
fn (l Logger) red(msg string)

#fn (Logger) green

inline
fn (l Logger) green(msg string)

#fn (Logger) log

inline
fn (l Logger) log(msg string)

#fn (Logger) as_yellow

inline
fn (l Logger) as_yellow(msg string) string

#fn (Logger) as_gray

inline
fn (l Logger) as_gray(msg string) string

#fn (Logger) as_red

inline
fn (l Logger) as_red(msg string) string

#fn (Logger) as_green

inline
fn (l Logger) as_green(msg string) string

#fn (Logger) as_bold

inline
fn (l Logger) as_bold(msg string) string

Interfaces

This section is empty.

Enums

#enum ColorMode

pub enum ColorMode {
	auto
	always
	never
}