add log level arg for log_packet; added optional packet filtering