docstr: Override the default exception logger so it looks nice in CloudWatch Logs
docstr_tok: ["Override","the","default","exception","logger","so","it","looks","nice","in","CloudWatch","Logs"]
code: def formatException(self, ei):
      """Override the default exception logger so it looks nice in CloudWatch Logs"""
      value = super().formatException(ei)
  
      # Replace the newlines with carriage returns
      return value.replace("\n", "\r")
  
imports: import logging
  import os
label_desc: Use image node_id 1 for calling the LogFormatter obj's underlying member method code with example usage: obj.formatException(ei) and returns: value