add pattern to logcmd