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

Must LoggerSeverity (namespace) needed to be exposed? #1114

Open
bitPogo opened this issue Nov 4, 2020 · 5 comments
Open

Must LoggerSeverity (namespace) needed to be exposed? #1114

bitPogo opened this issue Nov 4, 2020 · 5 comments

Comments

@bitPogo
Copy link
Contributor

bitPogo commented Nov 4, 2020

This question refers only to the types, not to the actual code, since the usage there is clear by the context.

@ggrossetie
Copy link
Member

Are you saying that Asciidoctor.LoggerSeverity is not available/visible in TypeScript?

namespace LoggerSeverity {
function get(severity: string): number;
}

@bitPogo
Copy link
Contributor Author

bitPogo commented Nov 4, 2020

Nope...it should be useable, but I see no place where it is actually used.

@ggrossetie
Copy link
Member

OK, I didn't know 😄

I guess we could add a test in core/types/tests.ts. This API can be useful when you want to use a custom logger. You can learn more about that here: https://github.com/asciidoctor/asciidoctor.js/blob/cb0db00597ae7ecfd65cc717f3e67f8c284d5abe/docs/modules/processor/pages/logging-api.adoc#custom-logger

@bitPogo
Copy link
Contributor Author

bitPogo commented Nov 4, 2020

It's actually usage is only internal, since the namespace is not ported to the outside...at least not in typescript. However the code is speaking about it. The question is, if it should be exposed (so adding to the Asciidoctor class LoggerSeverity) or let it internal (so the type definition is dead code and should be delete, since it is basically just there).

@bitPogo
Copy link
Contributor Author

bitPogo commented Nov 4, 2020

Ah...so my first answer was wrong...Asciidoctor.LoggerSeverity is not present. Sorry a long day...I rewrote the whole types for kotlin...so thats why I stumbled over all those stuff...

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

No branches or pull requests

2 participants