cloudstack/test
Spaceman1984 b586eb22f1
Human readable sizes in logs (#4207)
This PR adds outputting human readable byte sizes in the management server logs, agent logs, and usage records. A non-dynamic global variable is added (display.human.readable.sizes) to control switching this feature on and off. This setting is sent to the agent on connection and is only read from the database when the management server is started up. The setting is kept in memory by the use of a static field on the NumbersUtil class and is available throughout the codebase.

Instead of seeing things like:
2020-07-23 15:31:58,593 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) (logid:) Seq 8-1863645820801253428: Processing: { Ans: , MgmtId: 52238089807, via: 8, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-224-VM","bytesSent":"106496","bytesReceived":"0","result":"true","details":"","wait":"0",}}] }

The KB MB and GB values will be printed out:

2020-07-23 15:31:58,593 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) (logid:) Seq 8-1863645820801253428: Processing: { Ans: , MgmtId: 52238089807, via: 8, Ver: v1, Flags: 10, [{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-224-VM","bytesSent":"(104.00 KB) 106496","bytesReceived":"(0 bytes) 0","result":"true","details":"","wait":"0",}}] }

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Human+Readable+Byte+sizes
2020-08-13 15:55:16 +05:30
..
bindirbak
conf Uniting all the READMEs from tools and test 2012-10-12 17:01:20 +05:30
integration Human readable sizes in logs (#4207) 2020-08-13 15:55:16 +05:30
metadata doc: replace virutal by virtual (typo) 2017-12-13 09:59:15 +01:00
scripts
selenium CLOUDSTACK-6015: add user account, add user, login as new user, delete user, delete user account. 2014-03-28 06:21:59 -04:00
src-not-used/main/java/com/cloud Human readable sizes in logs (#4207) 2020-08-13 15:55:16 +05:30
systemvm CLOUDSTACK-10168: VR duplicate entries in /etc/hosts when reusing VM name (#2366) 2017-12-20 23:19:12 +05:30
pom.xml Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00