def check(source)
    if source.match(/notice:\s+(.+?):\s+(.+)\s*/)
      source_element   = $1
      source_operation = ''
      source_message   = $2
                    
      source_elements  = source_element.split('/')
      source_operation = source_elements.pop.strip unless source_elements.last.match(/[\[\]]/)
                    
      if source_operation
        source_element = source_elements.join('/').strip
        
        logger.debug("#{source_element} includes: #{element} -- " + ( source_element.include?(element) ? 'true' : 'false' ))
        logger.debug("#{source_operation} is: #{operation} -- " + ( source_operation == operation ? 'true' : 'false' ))
        logger.debug("#{source_message} includes: #{message} -- " + ( source_message.include?(message) ? 'true' : 'false' ))
        
        if source_element.include?(element) && source_operation == operation && source_message.include?(message)
            logger.debug("MATCH! -> #{element} - #{operation} - #{message}") 
            return true
        end
      end
    end
    logger.debug("nothing -> #{element} - #{operation} - #{message}") 
    return false
  end
def check(source)
    if source.match(/notice:\s+(.+?):\s+(.+)\s*/)
      source_element   = $1
      source_operation = ''
      source_message   = $2
                    
      source_elements  = source_element.split('/')
      source_operation = source_elements.pop.strip unless source_elements.last.match(/[\[\]]/)
                    
      if source_operation
        source_element = source_elements.join('/').strip
        
        logger.debug("#{source_element} includes: #{element} -- " + ( source_element.include?(element) ? 'true' : 'false' ))
        logger.debug("#{source_operation} is: #{operation} -- " + ( source_operation == operation ? 'true' : 'false' ))
        logger.debug("#{source_message} includes: #{message} -- " + ( source_message.include?(message) ? 'true' : 'false' ))
        
        if source_element.include?(element) && source_operation == operation && source_message.include?(message)
            logger.debug("MATCH! -> #{element} - #{operation} - #{message}") 
            return true
        end
      end
    end
    logger.debug("nothing -> #{element} - #{operation} - #{message}") 
    return false
  end
-----------------------------------------------------------------------------
 Event handling