Implementations of the `context.Logger` interface.

Collection Info

View Source
Collection
core
Path
log
Entries
49

Source Files

Constants

5

Default_Console_Logger_Opts #

Source
Default_Console_Logger_Opts :: Options{.Level, .Terminal_Color, .Short_File_Path, .Line, .Procedure} | Full_Timestamp_Opts

Default_File_Logger_Opts #

Source
Default_File_Logger_Opts :: Options{.Level, .Short_File_Path, .Line, .Procedure} | Full_Timestamp_Opts

Full_Timestamp_Opts #

Source
Full_Timestamp_Opts :: Options{.Date, .Time}

Location_File_Opts #

Source
Location_File_Opts :: Options{.Short_File_Path, .Long_File_Path}

Location_Header_Opts #

Source
Location_Header_Opts :: Options{.Short_File_Path, .Long_File_Path, .Line, .Procedure}

Types

9

Log_Allocator #

Source
Log_Allocator :: Log_Allocator

Log_Allocator is an allocator which calls `context.logger` on each of its allocations operations. The format can be changed by setting the `size_fmt: Log_Allocator_Format` field to either `Bytes` or `Human`.

Logger #

Source
Logger :: Logger

Logger :: struct { procedure: Logger_Proc, data: rawptr, lowest_level: Level, options: Logger_Options, }

Logger_Proc #

Source
Logger_Proc :: Logger_Proc

Logger_Proc :: #type proc(data: rawptr, level: Level, text: string, options: Options, location := #caller_location);

Option #

Source
Option :: Logger_Option

Option :: enum { Level, Date, Time, Short_File_Path, Long_File_Path, Line, Procedure, Terminal_Color }

Procedures

34

assert #

Source
@(disabled=ODIN_DISABLE_ASSERT)
assert :: proc(condition: bool, message: string = #caller_expression(condition), loc := #caller_location) {…}

assertf #

Source
@(disabled=ODIN_DISABLE_ASSERT)
assertf :: proc(condition: bool, fmt_str: string, args: ..any, loc := #caller_location) {…}

destroy_console_logger #

Source
destroy_console_logger :: proc(log: Logger, allocator := context.allocator) {…}

destroy_file_logger #

Source
destroy_file_logger :: proc(log: Logger, allocator := context.allocator) {…}

destroy_multi_logger #

Source
destroy_multi_logger :: proc(log: Logger, allocator := context.allocator) {…}

ensure #

Source
ensure :: proc(condition: bool, message: string = #caller_expression(condition), loc := #caller_location) {…}

Variables

1

Level_Headers #

Source
Level_Headers: [50]string = [?]string{0 ..< 10 = "[DEBUG] --- ", 10 ..< 20 = "[INFO ] --- ", 20 ..< 30 = "[WARN ] --- ", 30 ..< 40 = "[ERROR] --- ", 40 ..< 50 = "[FATAL] --- "}