def logMessage(self, msg):
        """ This method will log the data together with time stamp.
        The eventual checking, file transfer and backup will also be done by
        this method. 

        :Parameters:
            - `msg` :   Contains the text message.

        :Returns:
            - None.

        :Raises:
            - `FileHandlingException` : Raised when file operation fails.
            
        """
        """ Getting the Time-Stamp """
        timeStr   = time.strftime(STR_TIME_FORMAT, time.localtime())
        
        string = msg
        
        self._logStr = TIMESTAMP + timeStr + SPACE + string + CR
        print self._logStr
       
        """ Calling the writeActionLog method """
        self.writeActionLog()
        
        """ Checking for Maximum entries """
        if( self._maxEntryCount >=  self._maxEntries):
            """ If the maximum entries is reached start the thread"""
            try:
                
                if self._threadFlag is not True:
                       
                    """ Creating a new thread object """
                    self._threadObject = WriteThread(self)

                    """ Starting the new thread """                
                    self._threadObject.start()
                    
                    """ Sleeping so that the thread runs """
                    time.sleep(1)
                else:
                    print('Log file already resized, Write thread active !!')
                    
            except Exception :
                printException()
 This method will log the data together with time stamp.
        The eventual checking, file transfer and backup will also be done by
        this method. 

        :Parameters:
            - `msg` :   Contains the text message.

        :Returns:
            - None.

        :Raises:
            - `FileHandlingException` : Raised when file operation fails.
            
        
recipes/Python/440477_Writes_logfiles_and_keep_backups/recipe-440477.py