It's hard to say from the picture but it looks like some sort of beetle. If the log has been sitting around after cutting or dead on the stump for some time, that is pretty common for beetles to lay their eggs on the dead tree and their larvae will tunnel in to feed, then turn into an adult and leave to look for other dead wood to attack.