diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-15 23:58:55 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-31 23:31:08 +0300 |
commit | 9e2e408323f967a3f8b13e27e601ebfaa109ffcd (patch) | |
tree | 9d360aa875afe98747a70c292d30e18f13efa3ec /intern/cycles/app/cycles_server.cpp | |
parent | bbf12722edb7d1cfbbdedd6757275ff386211fe0 (diff) |
Cycles: Add logging to OSL and CUDA initialization/compilation
This is what was handy troubleshooting issues in the studio,
plus this is exactly the same thing which would be helpful
when solving issues with paths to compiled shaders and cubins
for standalone repository.
Diffstat (limited to 'intern/cycles/app/cycles_server.cpp')
-rw-r--r-- | intern/cycles/app/cycles_server.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/intern/cycles/app/cycles_server.cpp b/intern/cycles/app/cycles_server.cpp index f471c2d0972..3d5b237eec1 100644 --- a/intern/cycles/app/cycles_server.cpp +++ b/intern/cycles/app/cycles_server.cpp @@ -29,13 +29,14 @@ using namespace ccl; int main(int argc, const char **argv) { + util_logging_init(argv[0]); path_init(); /* device types */ string devicelist = ""; string devicename = "cpu"; - bool list = false; - int threads = 0; + bool list = false, debug = false; + int threads = 0, verbosity = 1; vector<DeviceType>& types = Device::available_types(); @@ -53,6 +54,10 @@ int main(int argc, const char **argv) "--device %s", &devicename, ("Devices to use: " + devicelist).c_str(), "--list-devices", &list, "List information about all available devices", "--threads %d", &threads, "Number of threads to use for CPU device", +#ifdef WITH_CYCLES_LOGGING + "--debug", &debug, "Enable debug logging", + "--verbose %d", &verbosity, "Set verbosity of the logger", +#endif NULL); if(ap.parse(argc, argv) < 0) { @@ -60,7 +65,13 @@ int main(int argc, const char **argv) ap.usage(); exit(EXIT_FAILURE); } - else if(list) { + + if (debug) { + util_logging_start(); + util_logging_verbosity_set(verbosity); + } + + if(list) { vector<DeviceInfo>& devices = Device::available_devices(); printf("Devices:\n"); |