Fadelis / grpcmock

A gRPC Java testing tool to easily mock endpoints of gRPC services for IT or Unit testing
http://grpcmock.org
Apache License 2.0
144 stars 13 forks source link

Add ability to turn off logs #14

Closed mfanegg closed 2 years ago

mfanegg commented 2 years ago

Every time I make a request to a mock server I've started with grpcmock, I get an output like this:

Received request:
Request to some.path.HelloWorldAPI/Hello method
with headers:
Metadata(content-type=application/grpc,user-agent=grpc-java-netty/1.44.0,foo=bar)
with request:
some_request_object {
  foo: "bar"
}

When making a lot of requests during testing this gets a little annoying and can pollute the logs. Could we be given the option to turn this off? If this ability already exists, could it be documented more clearly?

Fadelis commented 2 years ago

Hi @mfaneg , as with any other library you can manage the amount of logs by changing the logging level. Ie.: when using spring boot you can add logging.level.org.grpcmock.GrpcMock: WARN in your application-test.yml