yardstick icon indicating copy to clipboard operation
yardstick copied to clipboard

Set the YARD logging level to silence warnings

Open dkubb opened this issue 11 years ago • 0 comments

One way to silence the warnings is to do YARD::Logger.instance.level = YARD::Logger::ERROR before YARD processes the source code. A better approach might be to explicitly provide the logger to YARD so that within the context of the parser it can use the specified logger.

Failing that, do something like:

logger   = YARD::Logger.instance
original = logger.level
begin
  logger.level = YARD::Logger::ERROR
  # ... do stuff with YARD ...
ensure
  logger.level = original
end

dkubb avatar Feb 19 '13 05:02 dkubb