cloudstack/plugins
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
..
acl projects: Role based users in Projects (#4128) 2020-08-13 15:45:39 +05:30
affinity-group-processors Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
alert-handlers Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
api projects: Role based users in Projects (#4128) 2020-08-13 15:45:39 +05:30
backup Merge remote-tracking branch 'origin/4.14' 2020-06-16 13:31:29 +05:30
ca/root-ca Merge remote-tracking branch 'origin/4.14' 2020-07-29 14:08:02 +05:30
database Merge remote-tracking branch 'origin/4.14' 2020-07-07 12:53:05 +05:30
dedicated-resources Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
deployment-planners Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
event-bus RabbitMQ log enhancement (#4100) 2020-06-02 10:13:23 +02:00
ha-planners/skip-heurestics Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
host-allocators/random Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
hypervisors Human readable sizes in logs (#4207) 2020-08-13 15:55:16 +05:30
integrations Human readable sizes in logs (#4207) 2020-08-13 15:55:16 +05:30
metrics Merge remote-tracking branch 'origin/4.14' 2020-06-18 19:48:45 +05:30
network-elements [VMware] Enable unmanaging guest VMs (#4103) 2020-06-26 08:31:43 -03:00
outofbandmanagement-drivers plugins: Redfish Client & Redfish OOBM Driver (#4175) 2020-07-30 10:51:16 +05:30
storage Human readable sizes in logs (#4207) 2020-08-13 15:55:16 +05:30
storage-allocators/random Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT 2020-05-23 10:18:39 +01:00
user-authenticators Merge remote-tracking branch 'origin/4.14' 2020-07-08 11:37:14 +05:30
pom.xml projects: Role based users in Projects (#4128) 2020-08-13 15:45:39 +05:30