mosaic icon indicating copy to clipboard operation
mosaic copied to clipboard

Logging side-channel via env var

Open JakeWharton opened this issue 1 year ago • 0 comments

It's hard to log, because the place we log is the primary output of the tool.

Introduce two env vars:

  • MOSAIC_LOG_LEVEL with two or three levels
  • MOSAIC_LOG_PATH with a path to write to

Logging should be lambda-based so it can be as little overhead as possible. Also need to ensure we can make the log path behave like stdout where it can be streamed in real time to another terminal tab/window.

Probably should also be public API since users will have this problem, too.

JakeWharton avatar Oct 15 '24 03:10 JakeWharton