diff options
author | Roman Pogribnyi <pogribnyi@gmail.com> | 2015-03-15 21:57:06 +0300 |
---|---|---|
committer | Roman Pogribnyi <pogribnyi@gmail.com> | 2015-03-15 21:57:06 +0300 |
commit | 5c64aa25541b973db4ec90c97e30b02d09b00075 (patch) | |
tree | 0cd3a8912d8b0cbfc5fe0bb94a2a42751e98dcd6 /intern/cycles/app/cycles_server.cpp | |
parent | 2a1a6bc5720a4310e42a67754998e0480bf7c59b (diff) | |
parent | 225027ce5dea3785626908b58b01fb3959cf8362 (diff) |
Merge branch 'master' into soc-2014-fluid
Diffstat (limited to 'intern/cycles/app/cycles_server.cpp')
-rw-r--r-- | intern/cycles/app/cycles_server.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/intern/cycles/app/cycles_server.cpp b/intern/cycles/app/cycles_server.cpp index f4cacb2d001..3d5b237eec1 100644 --- a/intern/cycles/app/cycles_server.cpp +++ b/intern/cycles/app/cycles_server.cpp @@ -11,7 +11,7 @@ * 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 <stdio.h> @@ -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"); |