binance-connector-java
binance-connector-java copied to clipboard
How to disable build-in logging mechanism
I'm writing a piece of code that uses java-binance-api library and I have a problem. Every time I run program, it leaves so much logs from web services execution. Everything works just fine, so now I would like to disable this feature. But it seems to be hard coded and I don't see any attribute to disable it.
Please someone tell me how to do it - disable logging both to standard output and to file. But please do not write something like 'take source code from GIT and erase logger from code and then compile library for yourself' ;)
OK. I assume that my problem cannot be solved without code changes. How to issue a something like 'change request' here in this forum to encourage someone to add new functionality (flag to classes like 'SpotClient') that could manage whether to enable or disable logging mechanism.
Thanks for the feedback, we will make a design with better logging.
@vckbarth Until it's resolved by the repo owners, you can define a logback-test.xml
to suppress the library's logback.xml
. An example:
<configuration>
<!-- to override binance-java-connector's logback.xml -->
</configuration>
I know it's hacky but still bearable I would say :)
I agree with this request, the logging configuration is the responsibility of the final application and not the library. I still can't find a way to remove it in my application and it's a problem: The microservices that we have running in a docker container should not reserve space for these log files, our architecture sends all this information to Grafana.
We've now released a new version 2.0.0rc2 without logback-classic
dependency, please have a try and if you encounter any problem, feel free to open a new Issue.
If logback-classic
is used on the user-end, I believe the following can be put into backlog.xml
file to suppress loggings from our lib:
<logger name="com.binance.connector" level="OFF"/>
thanks!