bThink-BGU / BPjs

Environment for running behavioral programs written in JavaScript.
MIT License
37 stars 8 forks source link

logger SPI #208

Closed michbarsinai closed 1 year ago

michbarsinai commented 1 year ago

Currently BPjs' logger is printing to the stream it has. This is OK for embedding in other systems, since the host can provide its own stream. However, the log level is lost since and the host has no efficient way of knowing if a printed message was INFO, FINE, or WARN.

We need to break the current logger into an interface and a default implementation. Then, allow client code to provide its own logger.