code: def logGPMsg(self, printMsg=True):
          
          from arcpy import GetMessages
  
          msgs = GetMessages()
          try:
              self.logMsg(msgs, printMsg)
          except:
              self.logMsg('error getting arcpy message', printMsg)
docs: logs the arcpy messages and prints them to the screen