def make_logs(response=None):
 if (not response):
  response = frappe.local.response
 if frappe.error_log:
  response[u'exc'] = json.dumps([frappe.utils.cstr(d) for d in frappe.local.error_log])
 if frappe.local.message_log:
  response[u'_server_messages'] = json.dumps([frappe.utils.cstr(d) for d in frappe.local.message_log])
 if ((frappe.debug_log and frappe.conf.get(u'logging')) or False):
  response[u'_debug_messages'] = json.dumps(frappe.local.debug_log)

def make_logs ( response = None ) : if ( not response ) : response = frappe . local . response if frappe . error_log : response [ u'exc' ] = json . dumps ( [ frappe . utils . cstr ( d ) for d in frappe . local . error_log ] ) if frappe . local . message_log : response [ u'_server_messages' ] = json . dumps ( [ frappe . utils . cstr ( d ) for d in frappe . local . message_log ] ) if ( ( frappe . debug_log and frappe . conf . get ( u'logging' ) ) or False ) : response [ u'_debug_messages' ] = json . dumps ( frappe . local . debug_log )
make strings for msgprint and errprint .