tokenizer icon indicating copy to clipboard operation
tokenizer copied to clipboard

remove log from init

Open jackielii opened this issue 1 year ago • 2 comments

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 avatar Feb 22 '24 16:02 jackielii

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

jackielii avatar Feb 23 '24 11:02 jackielii

@jackielii,

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

sugarme avatar Feb 25 '24 00:02 sugarme