class Logger extends debug.REGISTRY.Debuggable
A component to support the recording of logging information from CSO programs. See io.threadcso.debug.Logging for an example of how an elidable log can be specialized; and io.threadcso.alternation.Run for a typical use.
- Alphabetic
- By Inheritance
- Logger
- Debuggable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Logger(name: String, logSize: Int, mask: Int = 0xFFFFFFFF)
- name
name of the log
- logSize
the most recent
logSize
(or fewer) entries are recorded in a log.- mask
(variable) bitmask for the log: a call to
log(bits,...)
makes an entry in the log iffmask&bits==bits
@author Bernard Sufrin, Oxford $Revision: 238 $ $Date: 2017-10-07 21:21:09 +0100 (Sat, 07 Oct 2017) $
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(bits: Int, text: ⇒ String)(implicit loc: SourceLocation.SourceLocation): Unit
Atomically add the timestamped text to the end of the log if
mask&bits==bits
.Atomically add the timestamped text to the end of the log if
mask&bits==bits
. Calls to this method are elided if the CSO library was compiled with "-Xelide-below 350" (production versions are usually so-compiled). We rely on built-in JVM synchronization for atomicity.- Annotations
- @elidable( FINEST )
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
events: Seq[(basis.Nanoseconds, String, SourceLocation.SourceLocation, String)]
Approximation to the current sequence of entries recorded by this logger.
Approximation to the current sequence of entries recorded by this logger. Records consist of a timestamp (nanoseconds), a thread identifier, the source location (of the log call), the text being logged.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getWaiting: Seq[Thread]
Return a sequence of the threads currently waiting for this object, if any.
Return a sequence of the threads currently waiting for this object, if any. Default is the empty sequence.
- Definition Classes
- Debuggable
-
def
hasState: Boolean
This object has a state worth showing right now: false if showState will do no output.
This object has a state worth showing right now: false if showState will do no output.
- Definition Classes
- Debuggable
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
key: StateKey
This object's key in the registry (if non-negative)
This object's key in the registry (if non-negative)
- Definition Classes
- Debuggable
-
def
log(bits: Int, text: ⇒ String)(implicit loc: SourceLocation.SourceLocation): Unit
Atomically add the timestamped text to the end of the log if
mask&bits==bits. Calls to this method are not elidable. We rely on built-in JVM synchronization for atomicity.
- val logSize: Int
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def printState(): Unit
-
def
register(): Unit
Register this object
Register this object
- Definition Classes
- Debuggable
-
def
showState(out: PrintWriter): Unit
Output the log to the given
PrintWriter
Output the log to the given
PrintWriter
- Definition Classes
- Logger → Debuggable
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Logger → AnyRef → Any
-
def
unregister(): Unit
Unregister this object
Unregister this object
- Definition Classes
- Debuggable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withDebugger[T](condition: Boolean)(body: ⇒ T): T
Conditionally
register
this object with the debugger only for the duration of the evaluation ofbody
.Conditionally
register
this object with the debugger only for the duration of the evaluation ofbody
. To be used as a last resort for the exasperated CSO toolkit debugger.- Definition Classes
- Debuggable