object console extends Console
Used to print to stdout and stderr. See the console section.
- Annotations
- @native() @JSName( "console" )
- Alphabetic
- By Inheritance
- console
- Console
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assert(value: Any, args: Any*): Unit
A simple assertion test that verifies whether value is truthy.
A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message.
- Definition Classes
- Console
console.assert(value[, message][, ...])
Example: -
def
assert(value: Any, message: String, args: Any*): Unit
A simple assertion test that verifies whether value is truthy.
A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message.
- Definition Classes
- Console
console.assert(value[, message][, ...])
Example: -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
dir(obj: Any): Unit
Uses util.inspect() on obj and prints the resulting string to stdout.
Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj
- Definition Classes
- Console
console.dir(obj[, options])
Example: -
def
dir(obj: Any, options: ConsoleDirOptions): Unit
Uses util.inspect() on obj and prints the resulting string to stdout.
Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj
- Definition Classes
- Console
console.dir(obj[, options])
Example: -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(data: Any, args: Any*): Unit
Prints to stderr with newline.
Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()).
- data
the given data arguments
- Definition Classes
- Console
console.error([data][, ...])
Example: -
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
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
info(data: Any, args: Any*): Unit
The console.info() function is an alias for console.log().
The console.info() function is an alias for console.log().
- Definition Classes
- Console
console.info([data][, ...])
Example: -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
def
log(data: Any, args: Any*): Unit
Prints to stdout with newline.
Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()).
- data
the given data arguments
- Definition Classes
- Console
console.log([data][, ...])
Example: -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
time(label: String): Unit
Starts a timer that can be used to compute the duration of an operation.
Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique label. Use the same label when you call console.timeEnd() to stop the timer and output the elapsed time in milliseconds to stdout. Timer durations are accurate to the sub-millisecond.
- Definition Classes
- Console
console.time(label)
Example: -
def
timeEnd(label: String): Unit
Stops a timer that was previously started by calling console.time() and prints the result to stdout
Stops a timer that was previously started by calling console.time() and prints the result to stdout
- Definition Classes
- Console
console.timeEnd(label)
Example: -
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trace(message: String, args: Any*): Unit
Prints to stderr the string 'Trace :', followed by the util.format() formatted message and stack trace to the current position in the code.
Prints to stderr the string 'Trace :', followed by the util.format() formatted message and stack trace to the current position in the code.
- Definition Classes
- Console
console.trace(message[, ...])
Example: -
def
valueOf(): Any
- Definition Classes
- Object
-
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
warn(data: Any, args: Any*): Unit
Prints to stdout with newline.
Prints to stdout with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()).
- data
the given data arguments
- Definition Classes
- Console
console.log([data][, ...])
Example: