Skip to content
CinderBlock for process environment access
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include
src
.gitignore
LICENSE.md
README.md
cinderblock.xml

README.md

Cinder-ProcessEnvironment

Cinder-ProcessEnvironment is a CinderBlock to access the environment variables of the application process.

NOTE - This is now available in Cinder, see Utilities.h:

std::map<std::string, std::string> getEnvironmentVariables();

with a Windows implementation as well, see #744 for more detail.

EXAMPLE

void DisplayApp::setup() {
  // enable file logging if the ENV variable XCODE is not defined
  map<string, string> env = Cinder::ProcessEnvironment::GetEnvironment();
  if (env.count("XCODE") == 0) {
    fs::path filePath = expandPath("~/Desktop/Display.log");
    log::manager()->enableFileLogging(filePath);
  }
}
You can’t perform that action at this time.