hmis-tools / hmis-api-server

Version 2 of OpenHMIS
Mozilla Public License 2.0
15 stars 11 forks source link

Way way way way way way way way too much logging output. Srsly. #72

Closed kfogel closed 7 years ago

kfogel commented 7 years ago

Wow. We certainly are printing quite a bit of log output. As of commit 650fce44360, with this patch in place...

--- src/main/java/org/openhmis/webservice/ClientService.java
+++ src/main/java/org/openhmis/webservice/ClientService.java
@@ -49,6 +49,10 @@ public class ClientService {

        // Return clients that match the search terms
         List<ClientDTO> clientDTOs = clientManager.getClients(searchDTO);
+        /* TBD (issue #65): We need to determine a standard logging
+           format, some conventions, and maybe a helper class to
+           enforce it all.  But for now, let's just do some logging. */
+        log.debug("GET /clients/ KFF");
         return clientDTOs;
    }

...doing a GET on /api/v3/clients (via Postman in Chromium) produces 13352 lines of log output in /var/lib/tomcat7/logs/catalina.out. And I'm going to attach them all here, so you know I'm serious. Note that the second-to-last line is the one coming from the above patch; all the rest were apparently our default behavior already.

openhmis-log-output.txt

slifty commented 7 years ago

Idk this sounds like a feature not a bug!

Then again, I am a beaver and eat logs for nutritional purposes.

kfogel commented 7 years ago

Daniel. This is not helpful.

/me glares

cecilia-donnelly commented 7 years ago

@kfogel and I reduced the logging level from debug to info, so this is complete. See the commit message in https://github.com/hmis-tools/hmis-api-server/commit/0e7aa11a0607dac1a88adf7b2346b213e6b150d1 for more detail.