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

Improve Console Implementation #27

Open
Redfire75369 opened this issue Mar 23, 2023 · 1 comment
Open

Improve Console Implementation #27

Redfire75369 opened this issue Mar 23, 2023 · 1 comment

Comments

@Redfire75369
Copy link
Owner

Redfire75369 commented Mar 23, 2023

The console implementation is currently quite bare bones, and does not follow the specification.

The specification specifies log levels for each of the functions on console. These levels should be honoured except for console.debug which will have LogLevel::Debug.

In addition, a formatter should be implemented to format strings according to the %s, %d, %i, %f, %o, %O specifiers. Do note that %% stands for % in the final string. All arguments passed to the various logging functions that take variable arguments (varargs) should pass them to the formatter function to obtain the string. If possible, the %c specifier can also be implemented, but extra work will be required.

The formatter should also be exposed from js, either as console.format or in some other form.

Requirements: Basic in JavaScript, Basic in Rust
Difficulty: Basic

Resources

@Redfire75369
Copy link
Owner Author

As of 6425540, format specifiers %{s,d,i,f,o,O} are implemented, and %c is ignored. Log levels have also been updated.

The remaining issue is exposing the formatter to JS.

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

No branches or pull requests

1 participant