0

I am creating an expectation using the Ruby client for mockserver and getting a bunch of logging messages in the console(terminal). I was wondering how to turn that off, but not print it out to a file.

I have tried this but it only prints it out to a file

client = MockServerClient.new(Config.mockserver.host, Config.mockserver.port)
client.logger = LoggingFactory::DEFAULT_FACTORY.log('yo', output: 'tmp.log', truncate: true)
Fizz
  • 235
  • 1
  • 2
  • 7

1 Answers1

3

You can chose whichever of these.

  • Logging in console: client.logger = Logger.new(STDOUT)

  • Logging into file: client.logger = Logger.new('log/foo.log', 'daily')

  • Logging nothing: client.logger = Logger.new(nil)

scorix
  • 2,436
  • 19
  • 23