dynamic log(msg)

Prints a debug message to the stdout if debug is true.

Source

log(msg) {
  if (debug) print('[book:$name] $msg');
}