Petersoj / alpaca-java

A Java API for Alpaca, the commission free, algo friendly, stock trading broker. https://alpaca.markets
https://petersoj.github.io/alpaca-java/
MIT License
198 stars 84 forks source link

How do I disable the info and debug messages coming from the APIs automatically #143

Closed Andys52621 closed 9 months ago

Andys52621 commented 9 months ago

Hello team,

Does anyone know How do i disable these messages coming in console automatically? I want only my custom important messages come to the console, but these auto messages coming very rapidly and make it very difficult to see application messages and my important messages get lost in scrolling. Here is the Example of the messages below.

Thank you, Andy

23:53:37.443 [main] DEBUG net.jacobpeterson.alpaca.util.properties.PropertyUtil - Loaded default properties file: alpaca.default.properties 23:53:37.446 [main] DEBUG net.jacobpeterson.alpaca.util.properties.PropertyUtil - Could not find property file: alpaca.properties 23:53:37.446 [main] INFO net.jacobpeterson.alpaca.util.properties.PropertyUtil - Using default properties for: alpaca.properties 23:53:37.491 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - --> GET https://paper-api.alpaca.markets/v2/clock http/1.1 23:53:37.491 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - User-Agent: JavaRuntimeEnvironment/ OkHttp/4.9.1 23:53:37.491 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - APCA-API-KEY-ID: 23:53:37.491 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - APCA-API-SECRET-KEY: 23:53:37.491 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - --> END GET 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - <-- 200 OK https://paper-api.alpaca.markets/v2/clock (took 481 ms ) 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - Date: Sun, 31 Dec 2023 05:53:38 GMT 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - Content-Type: application/json; charset=UTF-8 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - Content-Length: 148 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - Connection: keep-alive 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - Access-Control-Allow-Origin: * 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - Vary: Origin 23:53:37.973 [main] INFO net.jacobpeterson.alpaca.AlpacaAPI - X-Ratelimit-Limit: 200

Petersoj commented 9 months ago

You accidentally posted your API keys in your post. I removed them from your post, but please roll your Alpaca API keys now! As far as your initial question, use your SLF4j implementation to modify which log messages are output to the console.

Andys52621 commented 9 months ago

Thank you Jacob ! Appreciate it :)

regards, Andy