logging class for nodejs. works with mongodb, file and console