src/Pure/General/output.scala
author wenzelm
Fri May 02 20:01:45 2014 +0200 (2014-05-02)
changeset 56831 e3ccf0809d51
parent 56830 e760242101fc
child 57453 77d13a98f1c8
permissions -rw-r--r--
prefer scala.Console with its support for thread-local redirection;
wenzelm@56782
     1
/*  Title:      Pure/General/output.ML
wenzelm@56782
     2
    Author:     Makarius
wenzelm@56782
     3
wenzelm@56830
     4
Isabelle channels for diagnostic output.
wenzelm@56782
     5
*/
wenzelm@56782
     6
wenzelm@56782
     7
package isabelle
wenzelm@56782
     8
wenzelm@56782
     9
wenzelm@56782
    10
object Output
wenzelm@56782
    11
{
wenzelm@56782
    12
  def warning_text(msg: String): String = cat_lines(split_lines(msg).map("### " + _))
wenzelm@56782
    13
  def error_text(msg: String): String = cat_lines(split_lines(msg).map("*** " + _))
wenzelm@56782
    14
wenzelm@56831
    15
  def writeln(msg: String) { Console.err.println(msg) }
wenzelm@56831
    16
  def warning(msg: String) { Console.err.println(warning_text(msg)) }
wenzelm@56831
    17
  def error_message(msg: String) { Console.err.println(error_text(msg)) }
wenzelm@56782
    18
}
wenzelm@56782
    19