18 using namespace Nymph;
20 KTLOGGER(testlog,
"TestCacheDirectory");
27 KTINFO(testlog,
"Testing ./ (should pass if the current directory is read/writeable)");
28 KTINFO(testlog,
"Current cache directory is: " << cacheDir->
GetPath());
29 KTWARN(testlog,
"Is the cache directory OK? " << cacheDir->
IsReady());
31 KTINFO(testlog,
"Testing ./TestCacheDirectory (should pass if ./TestCacheDirectory exists and is read/writeable)");
32 if (! cacheDir->
SetPath(
"./TestCacheDirectory"))
34 KTERROR(testlog,
"Error setting the path");
36 KTINFO(testlog,
"Current cache directory is: " << cacheDir->
GetPath());
37 KTWARN(testlog,
"Is the cache directory OK? " << cacheDir->
IsReady());
39 KTINFO(testlog,
"Testing /usr/local (should fail, assuming you're not running as root)");
40 if (! cacheDir->
SetPath(
"/usr/local"))
42 KTERROR(testlog,
"Error setting the path");
44 KTINFO(testlog,
"Current cache directory is: " << cacheDir->
GetPath());
45 KTWARN(testlog,
"Is the cache directory OK? " << cacheDir->
IsReady());
bool SetPath(const std::string &strPath)
KTLOGGER(applog, "KTApplication")
bool IsReady() const
Check if everything has been correctly configured.
const std::string & GetPath() const
Contains the logger class and macros, based on Kasper's KLogger class.