javascipt logger using anchor and mongodb