block static method

dynamic block(
  1. RunWithLog block
)

Creates auto tag and logger, then executes the code block with a logger to use. Limiting number of 'stacktrace' based tag generation inside the block.

Implementation

static dynamic block(RunWithLog block) {
  return withTag(LogTree.getTag(stackIndex: 2), block);
}