package core:log

⌘K
Ctrl+K
or
/

    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,
    	size_fmt:  Log_Allocator_Format,
    }
    Related Procedures With Parameters

    Log_Allocator_Format ¶

    Log_Allocator_Format :: enum int {
    	Bytes, // Actual number of bytes.
    	Human, // Bytes in human units like bytes, kibibytes, etc. as appropriate.
    }
    Related Procedures With Parameters

    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
    

    }

    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

    assert ¶

    assert :: proc(condition: bool, message: string = "", loc := #caller_location) {…}

    assertf ¶

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

    create_console_logger ¶

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

    create_file_logger ¶

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

    create_multi_logger ¶

    create_multi_logger :: proc(.. logs: ..runtime.Logger, allocator := context.allocator) -> runtime.Logger {…}

    debug ¶

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

    debugf ¶

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

    destroy_console_logger ¶

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

    destroy_file_logger ¶

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

    destroy_multi_logger ¶

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

    do_level_header ¶

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

    do_location_header ¶

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

    do_time_header ¶

    do_time_header :: proc(opts: bit_set[runtime.Logger_Option], buf: ^strings.Builder, t: time.Time) {…}

    error ¶

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

    errorf ¶

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

    fatal ¶

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

    fatalf ¶

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

    file_console_logger_proc ¶

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

    info ¶

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

    infof ¶

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

    log ¶

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

    log_allocator ¶

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

    log_allocator_init ¶

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

    log_allocator_proc ¶

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

    logf ¶

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

    multi_logger_proc ¶

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

    nil_logger ¶

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

    panic ¶

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

    panicf ¶

    panicf :: proc(fmt_str: string, .. args: ..any, location := #caller_location) -> ! {…}

    warn ¶

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

    warnf ¶

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

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-02 21:12:12.649122400 +0000 UTC