C++
google::InitGoogleLogging("XXX");
google::SetCommandLineOption("GLOG_minloglevel", "2");
Python
# coding: utf-8
pycaffe_dir = '/home/zz/work/caffe-BVLC/python'
import sys
sys.path.insert(0, pycaffe_dir)
os.environ['GLOG_minloglevel'] = '2'
import caffe