package core:log

Types

File_Console_Logger_Data ¶

File_Console_Logger_Data :: struct {
	file_handle: os.Handle,
	ident:       string,
}

Level ¶

Level :: runtime.Logger_Level
 

Logger_Level :: enum {

Debug   = 0,
Info    = 10,
Warning = 20,
Error   = 30,
Fatal   = 40,

}

Log_Allocator ¶

Log_Allocator :: struct {
	allocator: runtime.Allocator,
	level:     runtime.Logger_Level,
	prefix:    string,
	locked:    bool,
}

Logger ¶

Logger :: runtime.Logger
 

Logger :: struct {

procedure:    Logger_Proc,
data:      	  rawptr,
lowest_level: Level,
options:   	  Logger_Options,

}

Logger_Proc ¶

Logger_Proc :: runtime.Logger_Proc
 

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

Multi_Logger_Data ¶

Multi_Logger_Data :: struct {
	loggers: []runtime.Logger,
}

Option ¶

Option :: runtime.Logger_Option
 

Option :: enum {

Level,
Date,
Time,
Short_File_Path,
Long_File_Path,
Line,
Procedure,
Terminal_Color

}

Options ¶

Options :: bit_set[runtime.Logger_Option]
 

Options :: bit_set[Option];

Constants

Default_Console_Logger_Opts ¶

Default_Console_Logger_Opts: bit_set[runtime.Logger_Option] : Options{.Level, .Terminal_Color, .Short_File_Path, .Line, .Procedure} | Full_Timestamp_Opts

Default_File_Logger_Opts ¶

Default_File_Logger_Opts: bit_set[runtime.Logger_Option] : Options{.Level, .Short_File_Path, .Line, .Procedure} | Full_Timestamp_Opts

Full_Timestamp_Opts ¶

Full_Timestamp_Opts: bit_set[runtime.Logger_Option] : Options{.Date, .Time}

Location_File_Opts ¶

Location_File_Opts: bit_set[runtime.Logger_Option] : Options{.Short_File_Path, .Long_File_Path}

Location_Header_Opts ¶

Location_Header_Opts: bit_set[runtime.Logger_Option] : Options{.Short_File_Path, .Long_File_Path, .Line, .Procedure}

Variables

Level_Headers ¶

Level_Headers: [50]string = …

Procedures

create_console_logger ¶

create_console_logger :: proc "odin" (lowest: runtime.Logger_Level = Level.Debug, opt: bit_set[runtime.Logger_Option] = Default_Console_Logger_Opts, ident: string = "") -> runtime.Logger {…}

create_file_logger ¶

create_file_logger :: proc "odin" (h: os.Handle, lowest: runtime.Logger_Level = Level.Debug, opt: bit_set[runtime.Logger_Option] = Default_File_Logger_Opts, ident: string = "") -> runtime.Logger {…}

create_multi_logger ¶

create_multi_logger :: proc "odin" (logs: ..runtime.Logger) -> runtime.Logger {…}

debug ¶

debug :: proc "odin" (args: ..any, sep: string = " ", location := #caller_location) {…}

debugf ¶

debugf :: proc "odin" (fmt_str: string, args: ..any, location := #caller_location) {…}

destroy_console_logger ¶

destroy_console_logger :: proc "odin" (log: runtime.Logger) {…}

destroy_file_logger ¶

destroy_file_logger :: proc "odin" (log: ^runtime.Logger) {…}

destroy_multi_logger ¶

destroy_multi_logger :: proc "odin" (log: ^runtime.Logger) {…}

do_level_header ¶

do_level_header :: proc "odin" (opts: bit_set[runtime.Logger_Option], level: runtime.Logger_Level, str: ^strings.Builder) {…}

do_location_header ¶

do_location_header :: proc "odin" (opts: bit_set[runtime.Logger_Option], buf: ^strings.Builder, location := #caller_location) {…}

error ¶

error :: proc "odin" (args: ..any, sep: string = " ", location := #caller_location) {…}

errorf ¶

errorf :: proc "odin" (fmt_str: string, args: ..any, location := #caller_location) {…}

fatal ¶

fatal :: proc "odin" (args: ..any, sep: string = " ", location := #caller_location) {…}

fatalf ¶

fatalf :: proc "odin" (fmt_str: string, args: ..any, location := #caller_location) {…}

file_console_logger_proc ¶

file_console_logger_proc :: proc "odin" (logger_data: rawptr, level: runtime.Logger_Level, text: string, options: bit_set[runtime.Logger_Option], location := #caller_location) {…}

info ¶

info :: proc "odin" (args: ..any, sep: string = " ", location := #caller_location) {…}

infof ¶

infof :: proc "odin" (fmt_str: string, args: ..any, location := #caller_location) {…}

log ¶

log :: proc "odin" (level: runtime.Logger_Level, args: ..any, sep: string = " ", location := #caller_location) {…}

log_allocator ¶

log_allocator :: proc "odin" (la: ^Log_Allocator) -> runtime.Allocator {…}

log_allocator_init ¶

log_allocator_init :: proc "odin" (la: ^Log_Allocator, level: runtime.Logger_Level, allocator := context.allocator, prefix: string = "") {…}

log_allocator_proc ¶

log_allocator_proc :: proc "odin" (
	allocator_data:  rawptr, 
	mode:            runtime.Allocator_Mode, 
	size, alignment: int, 
	old_memory:      rawptr, 
	old_size:        int, 
) -> ([]u8, runtime.Allocator_Error) {…}

logf ¶

logf :: proc "odin" (level: runtime.Logger_Level, fmt_str: string, args: ..any, location := #caller_location) {…}

multi_logger_proc ¶

multi_logger_proc :: proc "odin" (logger_data: rawptr, level: runtime.Logger_Level, text: string, options: bit_set[runtime.Logger_Option], location := #caller_location) {…}

nil_logger ¶

nil_logger :: proc "odin" () -> runtime.Logger {…}

nil_logger_proc ¶

nil_logger_proc :: proc "odin" (logger_data: rawptr, level: runtime.Logger_Level, text: string, options: bit_set[runtime.Logger_Option], location := #caller_location) {…}

panic ¶

panic :: proc "odin" (args: ..any, location := #caller_location) -> ! {…}

panicf ¶

panicf :: proc "odin" (fmt: string, args: ..any, loc := #caller_location) -> ! {…}

warn ¶

warn :: proc "odin" (args: ..any, sep: string = " ", location := #caller_location) {…}

warnf ¶

warnf :: proc "odin" (fmt_str: string, args: ..any, location := #caller_location) {…}

Procedure Groups

This section is empty.

Source Files

Generation Information

Generated with odin version dev-2022-10 (vendor "odin") Windows_amd64 @ 2022-10-05 21:11:47.383163600 +0000 UTC