MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / GetLayerLogOutput

Function GetLayerLogOutput

layers/layer_options.cpp:595–610  ·  view source on GitHub ↗

If log_filename is NULL or stdout, return stdout, otherwise try to open log_filename as a filename. If successful, return file handle, otherwise stdout

Source from the content-addressed store, hash-verified

593// If log_filename is NULL or stdout, return stdout, otherwise try to open log_filename
594// as a filename. If successful, return file handle, otherwise stdout
595FILE* GetLayerLogOutput(const char* log_filename, std::vector<std::string>& setting_warnings) {
596 FILE* log_output = NULL;
597 if (!log_filename || !strcmp("stdout", log_filename)) {
598 log_output = stdout;
599 } else {
600 log_output = fopen(log_filename, "w");
601 if (log_output == NULL) {
602 if (log_filename) {
603 setting_warnings.emplace_back("log_filename (" + std::string(log_filename) +
604 ") could not be opened, falling back to stdout instead.");
605 }
606 log_output = stdout;
607 }
608 }
609 return log_output;
610}
611
612// Definitions for Debug Actions
613enum VkLayerDbgActionBits {

Callers 1

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected