SystemStreams

mill.api.SystemStreams
See theSystemStreams companion class
object SystemStreams

Attributes

Companion
class
Source
SystemStreams.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

@Scaladoc(value = "/**\n * Used to check whether the system streams are all \"original\", i,e. they\n * have not been overridden. Used for code paths that need to work differently\n * if they have been overridden (e.g. handling subprocess stdout/stderr)\n *\n * Assumes that the application only uses [[withStreams]] to override\n * stdout/stderr/stdin.\n */")
def isOriginal(): Boolean

Used to check whether the system streams are all "original", i,e. they have not been overridden. Used for code paths that need to work differently if they have been overridden (e.g. handling subprocess stdout/stderr)

Used to check whether the system streams are all "original", i,e. they have not been overridden. Used for code paths that need to work differently if they have been overridden (e.g. handling subprocess stdout/stderr)

Assumes that the application only uses withStreams to override stdout/stderr/stdin.

Attributes

Source
SystemStreams.scala
@Scaladoc(value = "/**\n * The original non-override stderr, used for debugging purposes e.g. if you\n * want to print stuff while the system streams override are messed up\n */")
def originalErr: PrintStream

The original non-override stderr, used for debugging purposes e.g. if you want to print stuff while the system streams override are messed up

The original non-override stderr, used for debugging purposes e.g. if you want to print stuff while the system streams override are messed up

Attributes

Source
SystemStreams.scala

Attributes

Source
SystemStreams.scala
def withStreams[T](systemStreams: SystemStreams)(t: => T): T

Attributes

Source
SystemStreams.scala
@Scaladoc(value = "/**\n * Manages the global override of `System.{in,out,err}`. Overrides of those streams are\n * global, so we cannot just override them per-use-site in a multithreaded environment\n * because different threads may interleave and stomp over each other\'s over-writes.\n * Instead, we over-write them globally with a set of streams that does nothing but\n * forward to the per-thread [[ThreadLocalStreams.current]] streams, allowing callers\n * to each reach their own thread-local streams without clashing across multiple threads\n */")
def withTopLevelSystemStreamProxy[T](t: => T): T

Manages the global override of System.{in,out,err}. Overrides of those streams are global, so we cannot just override them per-use-site in a multithreaded environment because different threads may interleave and stomp over each other's over-writes. Instead, we over-write them globally with a set of streams that does nothing but forward to the per-thread ThreadLocalStreams.current streams, allowing callers to each reach their own thread-local streams without clashing across multiple threads

Manages the global override of System.{in,out,err}. Overrides of those streams are global, so we cannot just override them per-use-site in a multithreaded environment because different threads may interleave and stomp over each other's over-writes. Instead, we over-write them globally with a set of streams that does nothing but forward to the per-thread ThreadLocalStreams.current streams, allowing callers to each reach their own thread-local streams without clashing across multiple threads

Attributes

Source
SystemStreams.scala

Concrete fields

@Scaladoc(value = "/**\n * The original system streams of this process, before any redirection.\n *\n * NOTE: you should not use this! They do not get captured properly by Mill\'s stdout/err\n * redirection, and thus only get picked up from the Mill server log files asynchronously.\n * That means that the logs may appear out of order, jumbling your logs and screwing up\n * your terminal\n */")

The original system streams of this process, before any redirection.

The original system streams of this process, before any redirection.

NOTE: you should not use this! They do not get captured properly by Mill's stdout/err redirection, and thus only get picked up from the Mill server log files asynchronously. That means that the logs may appear out of order, jumbling your logs and screwing up your terminal

Attributes

Source
SystemStreams.scala