refactor filter and improve Logging class