dkubb / yardstick

A tool for verifying YARD documentation coverage
http://wiki.github.com/dkubb/yardstick
MIT License
172 stars 22 forks source link

Set the YARD logging level to silence warnings #6

Open dkubb opened 11 years ago

dkubb commented 11 years ago

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