ToJSON convert log record to json
(formated bool)
| 22 | |
| 23 | // ToJSON convert log record to json |
| 24 | func (ccm CliCommonMessage) ToJSON(formated bool) string { |
| 25 | if formated { |
| 26 | return utils.ObjectToJSONStringFormatted(ccm) |
| 27 | } |
| 28 | return utils.ObjectToJSONString(ccm) |
| 29 | } |
| 30 | |
| 31 | // NewCliCommonMessage to create a client comment message |
| 32 | func NewCliCommonMessage(error bool, message string, data interface{}) CliCommonMessage { |
no test coverage detected