CUBA temp and work directory

I have an application that needs to log temp files. What is the best way to accomplish this. I see in the documentation that one needs to edit
the cuba.tempdir property.

  1. where is this file located?
  2. how do I get this value from my code?

As explained in the docs, the temporary and working directories are used by various platform mechanisms. For example, the working directory is the default place for FileStorage.
These directories are defined by application properties cuba.tempDir and cuba.dataDir. You can get them in code by using AppContext.getProperty() or by injecting the GlobalConfig interface.