diff options
| author | gingerBill <bill@gingerbill.org> | 2020-07-14 16:36:47 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-07-14 16:36:47 +0100 |
| commit | ede135a08f71d00e8ea0a1d083baae9267753c7a (patch) | |
| tree | e2c25572e3bf7fbc94364f8330b1f3d7dd94fe66 | |
| parent | c18fc2da9f4aa38a2bc86b6d2c32fb8d50db4545 (diff) | |
| parent | c8a3937ea0bcd0ef8dd0ed7b83f4af50f92d588f (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
| -rw-r--r-- | core/log/log.odin | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/core/log/log.odin b/core/log/log.odin index d932da5db..33be15931 100644 --- a/core/log/log.odin +++ b/core/log/log.odin @@ -93,20 +93,20 @@ fatalf :: proc(fmt_str: string, args: ..any, location := #caller_location) { logf(level=.Fatal, fmt_str=fmt_str, args=args, location=location); } -debug :: proc(args: ..any, location := #caller_location) { - log(level=.Debug, args=args, location=location); +debug :: proc(args: ..any, sep := " ", location := #caller_location) { + log(level=.Debug, args=args, sep=sep, location=location); } -info :: proc(args: ..any, location := #caller_location) { - log(level=.Info, args=args, location=location); +info :: proc(args: ..any, sep := " ", location := #caller_location) { + log(level=.Info, args=args, sep=sep, location=location); } -warn :: proc(args: ..any, location := #caller_location) { - log(level=.Warning, args=args, location=location); +warn :: proc(args: ..any, sep := " ", location := #caller_location) { + log(level=.Warning, args=args, sep=sep, location=location); } -error :: proc(args: ..any, location := #caller_location) { - log(level=.Error, args=args, location=location); +error :: proc(args: ..any, sep := " ", location := #caller_location) { + log(level=.Error, args=args, sep=sep, location=location); } -fatal :: proc(args: ..any, location := #caller_location) { - log(level=.Fatal, args=args, location=location); +fatal :: proc(args: ..any, sep := " ", location := #caller_location) { + log(level=.Fatal, args=args, sep=sep, location=location); } panic :: proc(args: ..any, location := #caller_location) -> ! { @@ -121,12 +121,12 @@ panicf :: proc(fmt_str: string, args: ..any, location := #caller_location) -> ! -log :: proc(level: Level, args: ..any, location := #caller_location) { +log :: proc(level: Level, args: ..any, sep := " ", location := #caller_location) { logger := context.logger; if level < logger.lowest_level { return; } - str := fmt.tprint(..args); //NOTE(Hoej): While tprint isn't thread-safe, no logging is. + str := fmt.tprint(args=args, sep=sep); //NOTE(Hoej): While tprint isn't thread-safe, no logging is. logger.procedure(logger.data, level, str, logger.options, location); } |