MongoDB logging all queries

The question is as basic as it is simple… How do you log all queries in a “tail”able log file in mongodb? I have tried: setting the profiling level setting the slow ms parameter starting mongod with the -vv option The /var/log/mongodb/mongodb.log keeps showing just the current number of active connections… 16 Answers 16

Configuring Log4j Loggers Programmatically

I am trying to use SLF4J (with log4j binding) for the first time. I would like to configure 3 different named Loggers that can be returned by a LoggerFactory which will log different levels and push the messages to different appenders: Logger 1 “FileLogger” logs DEBUG and appends to DailyRollingFileAppender Logger 2 “TracingLogger” logs TRACE+ … Read more

How can I disable logging while running unit tests in Python Django?

I am using a simple unit test based test runner to test my Django application. My application itself is configured to use a basic logger in using: logging.basicConfig(level=logging.DEBUG) And in my application code using: logger = logging.getLogger(__name__) logger.setLevel(getattr(settings, ‘LOG_LEVEL’, logging.DEBUG)) However, when running unittests, I’d like to disable logging so that it doesn’t clutter … Read more