Sorry, we don't support your browser.  Install a modern browser

Logs are noisy when maing unirest calls#241

T

I have many scripts that make use of the unirest library to make API calls to Jira, Confluence, and other applications.

When I make those calls, they make at least two log entries for each call. This adds tons of extra noise in my logs that I would rather not have to filter through.
For an example, here is a small section of my log of my script. I’ve indicated with * the lines that are not coming from my script but from somewhere in unirest:

2024-07-17 20:08:00.242 INFO - Processing app: Lucidchart
2024-07-17 20:08:00.261 INFO - appApprovalType: Manager
2024-07-17 20:08:00.397 INFO - Serializing object into ‘interface java.util.Map’ 2024-07-17 20:08:00.398 INFO - GET /rest/api/3/user?accountId=61f84c48c6bd1a00691c6f57 asObject Request Duration: 136ms
2024-07-17 20:08:00.399 INFO - Reporter: adam@smarsh.com
2024-07-17 20:08:00.399 INFO - Status is Provisioning. Check if we can auto-provision
2024-07-17 20:08:00.400 INFO - Group Name: Lucid - PAID Full Licensed Users
2024-07-17 20:08:00.711 INFO - Serializing object into ‘interface java.util.List’ 2024-07-17 20:08:00.711 INFO - GET https://smarsh.okta.com/api/v1/groups?q=Luci&limit=2 asObject Request Duration: 308ms
2024-07-17 20:08:00.715 INFO - Provisioning user ana@smarsh.com
2024-07-17 20:08:00.870 INFO - Serializing object into ‘interface java.util.List’ 2024-07-17 20:08:00.870 INFO - GET https://smarsh.okta.com/api/v1/users?search=profile.email+eq+%22ana%40smarsh.com%22&limit=2 asObject Request Duration: 153ms
2024-07-17 20:08:00.871 INFO - Adding user ana@smarsh.com to group Lucid - PAID Full Licensed Users
2024-07-17 20:08:00.872 INFO - https://smarsh.okta.com/api/v1/groups/00g1hyjhNWPI4x7/users/00ugsdgs6b7Ezs4x7 2024-07-17 20:08:01.995 INFO - PUT https://smarsh.okta.com/api/v1/groups/00g1hyjhNWPI4x7/users/00ugsdbl1b7Ezs4x7 asString Request Duration: 1122ms

This is just one user in a list of many so the extra logging significantly extends the log with information I don’t want/need to see.

Please give me a way to turn off the logging from Unirest.

5 months ago