.ide Channge logger subclasses to more simple Logd, Logi, Logw, Loge.

git-svn-id: svn://ultimatepp.org/upp/trunk@11009 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2017-04-16 16:28:58 +00:00
parent b42bedba88
commit e528b59fb9
4 changed files with 18 additions and 18 deletions

View file

@ -37,7 +37,7 @@ bool AndroidBuilder::BuildPackage(
const Vector<String>& all_libraries,
int)
{
LoggerDebug() << METHOD_NAME;
Logd() << METHOD_NAME;
InitProject();
if(!ValidateBuilderEnviorement())
@ -152,12 +152,12 @@ bool AndroidBuilder::BuildPackage(
}
if(isResourcesPackage || nativeSources.IsEmpty()) {
LoggerDebug() << METHOD_NAME << "There are not native files in the following package " << package << ".";
Logd() << METHOD_NAME << "There are not native files in the following package " << package << ".";
return true;
}
if(isBlitz) {
LoggerDebug() << METHOD_NAME << "Creating blitz step for package " << package << ".";
Logd() << METHOD_NAME << "Creating blitz step for package " << package << ".";
BlitzBuilderComponent bc(this);
bc.SetWorkingDir(project->GetJniDir() + DIR_SEPS + package);
@ -169,7 +169,7 @@ bool AndroidBuilder::BuildPackage(
noBlitzNativeSourceFiles);
if(!FileExists(blitz.path)) {
LoggerError() << METHOD_NAME << "Blitz was enable, but no blitz file generated.";
Loge() << METHOD_NAME << "Blitz was enable, but no blitz file generated.";
}
else {
nativeSources.Add(package + DIR_SEPS + GetFileName(blitz.path));
@ -431,7 +431,7 @@ bool AndroidBuilder::MovePackageFileToAndroidProject(const String& src, const St
{
String directory = GetFileDirectory(dst);
if(!RealizeDirectory(directory)) {
LoggerError() << METHOD_NAME << "Cannot relize following directory: \"" << directory << "\".";
Loge() << METHOD_NAME << "Cannot relize following directory: \"" << directory << "\".";
return false;
}

View file

@ -69,18 +69,18 @@ bool AndroidModuleMakeFileCreator::Save(const String& path)
{
String directory = GetFileDirectory(path);
if (!RealizeDirectory(directory)) {
LoggerError() << METHOD_NAME << "Creating module directory failed \"" << directory << "\".";
Loge() << METHOD_NAME << "Creating module directory failed \"" << directory << "\".";
return false;
}
String data = Create();
if (FileExists(path) && LoadFile(path) == data) {
LoggerInfo() << METHOD_NAME << "Following file \"" << path << "\" content is the same as previous one.";
Logi() << METHOD_NAME << "Following file \"" << path << "\" content is the same as previous one.";
return true;
}
if (!SaveFile(path, Create())) {
LoggerError() << METHOD_NAME << "Saving module file failed \"" << path << "\".";
Loge() << METHOD_NAME << "Saving module file failed \"" << path << "\".";
return false;
}

View file

@ -51,10 +51,10 @@ public: \
{} \
};
LOGGER(LoggerDebug, Logger::LoggingLevel::DEBUG)
LOGGER(LoggerInfo, Logger::LoggingLevel::INFO)
LOGGER(LoggerWarn, Logger::LoggingLevel::WARN)
LOGGER(LoggerError, Logger::LoggingLevel::ERROR)
LOGGER(Logd, Logger::LoggingLevel::DEBUG)
LOGGER(Logi, Logger::LoggingLevel::INFO)
LOGGER(Logw, Logger::LoggingLevel::WARN)
LOGGER(Loge, Logger::LoggingLevel::ERROR)
#undef LOGGER

View file

@ -27,13 +27,13 @@ bool Jdk::Validate() const
void Jdk::FindVersion(Host* host)
{
if (!Validate()) {
LoggerDebug() << METHOD_NAME << "Path to JDK is wrong or files are corrupted.";
Logw() << METHOD_NAME << "Path to JDK is wrong or files are corrupted.";
return;
}
StringStream ss;
if (host->Execute(GetJavacPath() + " -version", ss) != 0) {
LoggerDebug() << METHOD_NAME << "Cannot obtain version due to command execution failure.";
Logw() << METHOD_NAME << "Cannot obtain version due to command execution failure.";
return;
}
@ -41,25 +41,25 @@ void Jdk::FindVersion(Host* host)
output.Replace("\n", "");
Vector<String> splitedOutput = Split(output, " ");
if (splitedOutput.GetCount() != 2) {
LoggerDebug() << METHOD_NAME << "Splited output is too short (" + output + ").";
Logw() << METHOD_NAME << "Splited output is too short (" + output + ").";
return;
}
Vector<String> splitedVersion = Split(splitedOutput[1], ".");
if (splitedVersion.GetCount() != 3) {
LoggerDebug() << METHOD_NAME << "Splited version is too short (" + output + ").";
Logw() << METHOD_NAME << "Splited version is too short (" + output + ").";
return;
}
int major = StrInt(splitedVersion[0]);
if (major == INT_NULL) {
LoggerDebug() << METHOD_NAME << "Major version conversion to int failed (" + splitedVersion[0] + ").";
Logw() << METHOD_NAME << "Major version conversion to int failed (" + splitedVersion[0] + ").";
return;
}
int minor = StrInt(splitedVersion[1]);
if (minor == INT_NULL) {
LoggerDebug() << METHOD_NAME << "Minor version conversion to int failed (" + splitedVersion[1] + ").";
Logw() << METHOD_NAME << "Minor version conversion to int failed (" + splitedVersion[1] + ").";
return;
}