separate metric file, use seelog to output logs and embed struct to json.

sorry for messy commit. Still in practice.