Object Info node support for GLSL mode and the internal render
[blender-staging.git] / intern / cycles / blender / blender_logging.cpp
index d3f1accf0996489278b93bba165921aeeb24ccc4..d0f82e37662ad9b251ed640f0c40aa9a95b273f3 100644 (file)
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
  */
 
-#include "CCL_api.h"
-
-#include <stdio.h>
-
-#include "util_logging.h"
-
-#ifdef _MSC_VER
-#  define snprintf _snprintf
-#endif
+#include "blender/CCL_api.h"
+#include "util/util_logging.h"
 
 void CCL_init_logging(const char *argv0)
 {
-#ifdef WITH_CYCLES_LOGGING
-       /* Make it so FATAL messages are always print into console. */
-       char severity_fatal[32];
-       snprintf(severity_fatal, sizeof(severity_fatal), "%d",
-                google::GLOG_FATAL);
-
-       google::InitGoogleLogging(argv0);
-       google::SetCommandLineOption("logtostderr", "1");
-       google::SetCommandLineOption("v", "0");
-       google::SetCommandLineOption("stderrthreshold", severity_fatal);
-       google::SetCommandLineOption("minloglevel", severity_fatal);
-#else
-       (void) argv0;
-#endif
+       ccl::util_logging_init(argv0);
 }
 
 void CCL_start_debug_logging(void)
 {
-#ifdef WITH_CYCLES_LOGGING
-       google::SetCommandLineOption("logtostderr", "1");
-       google::SetCommandLineOption("v", "2");
-       google::SetCommandLineOption("stderrthreshold", "1");
-       google::SetCommandLineOption("minloglevel", "0");
-#endif
+       ccl::util_logging_start();
 }
 
 void CCL_logging_verbosity_set(int verbosity)
 {
-#ifdef WITH_CYCLES_LOGGING
-       char val[10];
-       snprintf(val, sizeof(val), "%d", verbosity);
-
-       google::SetCommandLineOption("v", val);
-#else
-       (void) verbosity;
-#endif
+       ccl::util_logging_verbosity_set(verbosity);
 }