Added GSON library to display log statements in pretty format.

Signed-off-by: Kalyan <kalyan.menda@whiteskylabs.com>
Reduced if statements

Signed-off-by: Kalyan <kalyan.menda@whiteskylabs.com>
reduced if statements and modified to dispay log statements in pretty format.

Signed-off-by: Kalyan <kalyan.menda@whiteskylabs.com>