Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core:log improvements #4463

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Lperlind
Copy link
Contributor

@Lperlind Lperlind commented Nov 7, 2024

There were various issues with core:log, namely that it would silently use context.allocator behind your back. The api has been changed to allow the user to provide an interface to the creation of file/console logger and multiloggers.

Furthermore updated the language used to be more consistent with odin's naming scheme. This renames create -> make and detroy -> delete.

The old names and behaviour have been deprecated and have had their behaviour retained.

Additionally support for os2 has been added.

Documentation was added too.

There were various issues with core:log, namely that it would
silently use context.allocator behind your back. The api has
been changed to allow the user to provide an interface to the
creation of file/console logger and multiloggers.

Furthermore updated the language used to be more consistent
with odin's naming scheme. This renames create -> make and
detroy -> delete.

The old names and behaviour have been deprecated and have had
their behaviour retained.

Additionally support for os2 has been added.
@Lperlind
Copy link
Contributor Author

Lperlind commented Nov 7, 2024

Looks like test runner got stuck

Copy link
Contributor

@flysand7 flysand7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a final review, I might have missed some obvious things in the docs.

core/log/file_console_logger.odin Outdated Show resolved Hide resolved
core/log/file_console_logger.odin Outdated Show resolved Hide resolved
core/log/file_console_logger.odin Outdated Show resolved Hide resolved
core/log/multi_logger.odin Outdated Show resolved Hide resolved
core/log/file_console_logger.odin Show resolved Hide resolved
core/log/file_console_logger.odin Outdated Show resolved Hide resolved
core/log/file_console_logger.odin Outdated Show resolved Hide resolved
core/log/file_console_logger.odin Outdated Show resolved Hide resolved
core/log/multi_logger.odin Outdated Show resolved Hide resolved
core/log/file_console_logger.odin Outdated Show resolved Hide resolved
@@ -6,8 +6,11 @@ import "core:encoding/ansi"
import "core:fmt"
import "core:strings"
import "core:os"
import "core:os/os2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My issue with importing os2 here is that it doesn't support everything yet. You might have to split file_console_logger.odin into two files. One for the platforms that support os2, and one for everything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants