mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-25 16:18:52 +01:00
Cleaned up log output.
This commit is contained in:
parent
a29b0ee528
commit
e39b30c5d0
@ -61,14 +61,14 @@ CollectionInfo *CollectionInfoBuilder::BuildCollection(std::string name)
|
||||
if(!Conf.GetProperty(launcherKey, launcherName))
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Warning: launcher property \""
|
||||
ss << "\""
|
||||
<< launcherKey
|
||||
<< "\" points to a launcher that is not configured (launchers."
|
||||
<< launcherName
|
||||
<< "). Your collection will be viewable, however you will not be able to "
|
||||
<< "launch any of the items in your collection.";
|
||||
|
||||
Logger::Write(Logger::ZONE_WARNING, "Collections", ss.str());
|
||||
Logger::Write(Logger::ZONE_NOTICE, "Collections", ss.str());
|
||||
}
|
||||
|
||||
CollectionInfo *collection = new CollectionInfo(name, listItemsPath, extensions, metadataType, metadataPath);
|
||||
@ -129,13 +129,13 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info)
|
||||
info->GetExtensions(extensions);
|
||||
|
||||
(void)Conf.GetProperty("collections." + info->GetName() + ".launcher", launcher);
|
||||
Logger::Write(Logger::ZONE_ERROR, "CollectionInfoBuilder", "Check path " + includeFile);
|
||||
Logger::Write(Logger::ZONE_INFO, "CollectionInfoBuilder", "Checking for \"" + includeFile + "\"");
|
||||
|
||||
dp = opendir(path.c_str());
|
||||
|
||||
if(dp == NULL)
|
||||
{
|
||||
Logger::Write(Logger::ZONE_ERROR, "CollectionInfoBuilder", "Could not read directory \"" + path + "\"");
|
||||
Logger::Write(Logger::ZONE_INFO, "CollectionInfoBuilder", "Could not read directory \"" + path + "\". Ignore if this is a menu.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -533,8 +533,6 @@ std::string Page::GetCollectionName()
|
||||
|
||||
void Page::FreeGraphicsMemory()
|
||||
{
|
||||
Logger::Write(Logger::ZONE_DEBUG, "Page", "Free");
|
||||
|
||||
for(MenuVector_T::iterator it = Menus.begin(); it != Menus.end(); it++)
|
||||
{
|
||||
ScrollingList *menu = *it;
|
||||
|
||||
@ -126,9 +126,6 @@ Page *PageBuilder::BuildPage()
|
||||
FontName = Config.ConvertToAbsolutePath(
|
||||
Config.GetAbsolutePath() + "/layouts/" + LayoutKey + "/",
|
||||
fontXml->value());
|
||||
|
||||
Logger::Write(Logger::ZONE_DEBUG, "Layout", "Layout font set to " + FontName);
|
||||
|
||||
}
|
||||
|
||||
if(fontColorXml)
|
||||
@ -164,7 +161,7 @@ Page *PageBuilder::BuildPage()
|
||||
|
||||
std::stringstream ss;
|
||||
ss << layoutWidth << "x" << layoutHeight << " (scale " << ScaleX << "x" << ScaleY << ")";
|
||||
Logger::Write(Logger::ZONE_DEBUG, "Layout", "Layout resolution " + ss.str());
|
||||
Logger::Write(Logger::ZONE_INFO, "Layout", "Layout resolution " + ss.str());
|
||||
|
||||
page = new Page(Config);
|
||||
|
||||
@ -232,10 +229,12 @@ Page *PageBuilder::BuildPage()
|
||||
|
||||
if(page)
|
||||
{
|
||||
Logger::Write(Logger::ZONE_DEBUG, "Layout", "Created page");
|
||||
Logger::Write(Logger::ZONE_INFO, "Layout", "Initialized");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::Write(Logger::ZONE_ERROR, "Layout", "Could not initialize layout (see previous messages for reason)");
|
||||
}
|
||||
|
||||
Logger::Write(Logger::ZONE_INFO, "Layout", "Initialized");
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ bool ImportConfiguration(Configuration *c)
|
||||
|
||||
if(dp == NULL)
|
||||
{
|
||||
Logger::Write(Logger::ZONE_ERROR, "RetroFE", "Could not read directory \"" + launchersPath + "\"");
|
||||
Logger::Write(Logger::ZONE_NOTICE, "RetroFE", "Could not read directory \"" + launchersPath + "\"");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -168,6 +168,9 @@ bool RetroFE::DeInitialize()
|
||||
|
||||
Initialized = false;
|
||||
//todo: handle video deallocation
|
||||
|
||||
Logger::Write(Logger::ZONE_INFO, "RetroFE", "Exiting");
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@ -482,11 +485,6 @@ CollectionInfo *RetroFE::GetCollection(std::string collectionName)
|
||||
CollectionInfoBuilder cib(Config, *MetaDb);
|
||||
CollectionInfo *collection = cib.BuildCollection(collectionName);
|
||||
|
||||
if(collection->GetItems()->size() == 0)
|
||||
{
|
||||
Logger::Write(Logger::ZONE_WARNING, "RetroFE", "No list items found for collection " + collectionName);
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ bool SDL::Initialize(Configuration &config)
|
||||
int audioBuffers = 4096;
|
||||
bool hideMouse;
|
||||
|
||||
Logger::Write(Logger::ZONE_DEBUG, "SDL", "Initializing");
|
||||
Logger::Write(Logger::ZONE_INFO, "SDL", "Initializing");
|
||||
if (retVal && SDL_Init(SDL_INIT_EVERYTHING) != 0)
|
||||
{
|
||||
std::string error = SDL_GetError();
|
||||
@ -140,9 +140,12 @@ bool SDL::Initialize(Configuration &config)
|
||||
|
||||
if(retVal)
|
||||
{
|
||||
std::string fullscreenStr = Fullscreen ? "yes" : "no";
|
||||
std::stringstream ss;
|
||||
ss << "Creating "<< WindowWidth << "x" << WindowHeight << " window (fullscreen: " << Fullscreen << ")";
|
||||
Logger::Write(Logger::ZONE_DEBUG, "SDL", ss.str());
|
||||
ss << "Creating "<< WindowWidth << "x" << WindowHeight << " window (fullscreen: "
|
||||
<< fullscreenStr << ")";
|
||||
|
||||
Logger::Write(Logger::ZONE_INFO, "SDL", ss.str());
|
||||
|
||||
Window = SDL_CreateWindow("RetroFE",
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
@ -204,7 +207,7 @@ bool SDL::Initialize(Configuration &config)
|
||||
bool SDL::DeInitialize()
|
||||
{
|
||||
std::string error = SDL_GetError();
|
||||
Logger::Write(Logger::ZONE_DEBUG, "SDL", "DeInitializing");
|
||||
Logger::Write(Logger::ZONE_INFO, "SDL", "DeInitializing");
|
||||
|
||||
Mix_CloseAudio();
|
||||
Mix_Quit();
|
||||
|
||||
@ -58,6 +58,9 @@ void Logger::Write(Zone zone, std::string component, std::string message)
|
||||
case ZONE_DEBUG:
|
||||
zoneStr = "DEBUG";
|
||||
break;
|
||||
case ZONE_NOTICE:
|
||||
zoneStr = "NOTICE";
|
||||
break;
|
||||
case ZONE_WARNING:
|
||||
zoneStr = "WARNING";
|
||||
break;
|
||||
|
||||
@ -28,6 +28,7 @@ public:
|
||||
{
|
||||
ZONE_DEBUG,
|
||||
ZONE_INFO,
|
||||
ZONE_NOTICE,
|
||||
ZONE_WARNING,
|
||||
ZONE_ERROR
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user