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

remove log from init #39

Open
jackielii opened this issue Feb 22, 2024 · 2 comments
Open

remove log from init #39

jackielii opened this issue Feb 22, 2024 · 2 comments

Comments

@jackielii
Copy link
Contributor

Hi, thanks for this lib!

I found that a log.Print is used at init: https://github.com/sugarme/tokenizer/blob/master/init.go#L21 which I can't avoid.

My application is using stdout & stderr to communicate. Do you mind remove this log print and move to slog for finer log level control?

Thanks.

@jackielii
Copy link
Contributor Author

Also, the use of log.Fatal breaks normal flow. I think error should be returned: https://github.com/sugarme/tokenizer/blob/master/tokenizer.go#L207

@sugarme
Copy link
Owner

sugarme commented Feb 25, 2024

@jackielii,

Thanks for the report. Would love to have your PR as well. Cheers.

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

2 participants