diff options
author | buraq <buraq@epfl.ch> | 2004-11-15 17:24:20 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-11-15 17:24:20 +0000 |
commit | fec3fd9ee63f85af4848c4eb67d1d9f1920a0ceb (patch) | |
tree | 2bd6995a115c7f243a9786fccc7021e85c9bd79f /sources | |
parent | 4ba5a222f53f03fab58b4991c3ddf5f556e2c080 (diff) | |
download | scala-fec3fd9ee63f85af4848c4eb67d1d9f1920a0ceb.tar.gz scala-fec3fd9ee63f85af4848c4eb67d1d9f1920a0ceb.tar.bz2 scala-fec3fd9ee63f85af4848c4eb67d1d9f1920a0ceb.zip |
hello
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/util/logging/ConsoleLogger.scala | 10 | ||||
-rw-r--r-- | sources/scala/util/logging/Logged.scala | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sources/scala/util/logging/ConsoleLogger.scala b/sources/scala/util/logging/ConsoleLogger.scala new file mode 100644 index 0000000000..466f03c50f --- /dev/null +++ b/sources/scala/util/logging/ConsoleLogger.scala @@ -0,0 +1,10 @@ +package scala.util.logging; +/** + * A ConsoleLogger is mixed into a concrete class who has class Logged + * among its base traits. + */ +trait ConsoleLogger { + /** logs argument to Console using Console.println + */ + def log(msg:String): Unit = Console.println(msg); +} diff --git a/sources/scala/util/logging/Logged.scala b/sources/scala/util/logging/Logged.scala new file mode 100644 index 0000000000..06d42351f9 --- /dev/null +++ b/sources/scala/util/logging/Logged.scala @@ -0,0 +1,12 @@ +package scala.util.logging; + +/** + * Mixing in the trait Logged indicates that a class provides support + * for logging. + */ +trait Logged { + /** this method should log the message given as argument somewhere + * as a side-effect + */ + def log(msg:String): Unit; +} |