sbt / sbt-remote-control

Create and manage sbt process using unicorns and forks
Other
74 stars 14 forks source link

Log buffering next steps #166

Open havocp opened 10 years ago

havocp commented 10 years ago

Here's my suggestion as a first cut.

Short-term goals:

A possible way to do it:

Future elaboration to punt for now, because it requires fancy file-based solution:

jsuereth commented 10 years ago

Have you seen our TaskStreams API and how logs are handled there? If not you need to look into it, as we should be UNIFYING the core sbt as we do this, rather than creating duplicate systems.

TaskStreams is designed to store logs in a file stream and restore them on demand, as well as other aspects of data. I have a few experiments to refactor this API to be 100% stream of events, based model, but this is where you should be tackling things, especially if you're talking about saving/resotring previous execution results.

Do you have time for a call, possibly tomorrow or wed on this?

havocp commented 10 years ago

Yep I am around. fwiw I am not talking about a "system" here - I'm talking about a Map[Long,Seq[LogEvent]] private to ReadOnlyServerEngine ;-) that's the point about short term vs. future elaboration. Changing the standard sbt facility is probably an "N weeks" tasks and the proposal I made here is a probably an "N hours" task. If we did the weeks task then we'd drop the Map[Long,Seq[LogEvent]] in favor of a call into the new standard log buffers facility.

jsuereth commented 10 years ago

Yeah, it's not just about log buffers, but I get your point. Another band-aide is ok for now, but I think we may need to clean-up before launch. The logging subsystem of sbt is barely functional in the sbt-server, and things like this are destined to be issues soon.