MongoDB – Where is the log file?

Default, MongoDB creates the log file at this path /var/log/mongodb/mongodb.log, if the log file is not found, please check with the MongoDB config file. logpath Check the MongoDB config file at /etc/mongod.conf or /yourMongoDBpath/mongod.conf, the logpath defined where to log. /etc/mongod.conf $ cat /etc/mongod.conf # mongod.conf # Where to store the data. # Note: if …

Read more

GAE : how to output log messages to a file

By default, all logging messages will output to log console. To change the logging settings, find this file – {Google App Engine SDK directory}\google\appengine\tools\dev_appserver_main.py. File : dev_appserver_main.py – Find following pattern #… import getopt import logging import os import signal import sys import tempfile import traceback logging.basicConfig( level=logging.INFO, format=’%(levelname)-8s %(asctime)s %(filename)s:%(lineno)s] %(message)s’) #… Output to …

Read more

Download / export Google App Engine Logs, Java App

In GAE, Java App, you can use command “appcfg request_logs” to download or export the logs from GAE to your computer, see signature below : AppCfg [options] request_logs <app-dir> <output-file> You can type “appcfg request_logs” to view all available options. 1. What is <app-dir> ? This is NOT your app_id nor any deployed web path …

Read more

Configure logging in Google App Engine

Google App Engine for Java is using java.util.logging.Logger to perform the logging. In this tutorial, we show you how to do logging in GAE environment. 1. Logging Example Example to define a logger in MovieController, and log the messages in different logging levels (info, warning and error) import java.util.logging.Logger; //… @Controller @RequestMapping("/movie") public class MovieController …

Read more