|
From: <che...@us...> - 2010-02-01 21:46:45
|
Revision: 3406
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3406&view=rev
Author: chemelli_sf
Date: 2010-02-01 21:46:38 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Fixed logging
Modified Paths:
--------------
trunk/plugins/WorldMap/LocalizeStrings.cs
trunk/plugins/WorldMap/WorldMap.cs
Modified: trunk/plugins/WorldMap/LocalizeStrings.cs
===================================================================
--- trunk/plugins/WorldMap/LocalizeStrings.cs 2010-02-01 21:39:50 UTC (rev 3405)
+++ trunk/plugins/WorldMap/LocalizeStrings.cs 2010-02-01 21:46:38 UTC (rev 3406)
@@ -87,7 +87,7 @@
string cultureName = null;
if (language != null) cultureName = GetCultureName(language);
- Log.Info(" Loading localised Strings - Path: {0} Culture: {1} Language: {2} Prefix: {3}", directory, cultureName, language, isPrefixEnabled);
+ Log.Info("[Worldmap]: Loading localised Strings - Path: {0} Culture: {1} Language: {2} Prefix: {3}", directory, cultureName, language, isPrefixEnabled);
_stringProvider = new LocalisationProvider(directory, cultureName, isPrefixEnabled);
@@ -140,9 +140,9 @@
}
catch (System.FormatException e)
{
- Log.Error("Error formatting translation with id {0}", dwCode);
- Log.Error("Unformatted translation: {0}", translation);
- Log.Error(e);
+ Log.Error("[Worldmap]: Error formatting translation with id {0}", dwCode);
+ Log.Error("[Worldmap]: Unformatted translation: {0}", translation);
+ Log.Error("[Worldmap]: " + e);
return translation;
}
}
@@ -163,7 +163,7 @@
if (translation == null)
{
- Log.Error("No translation found for id {0}", dwCode);
+ Log.Error("[Worldmap]: No translation found for id {0}", dwCode);
return String.Empty;
}
@@ -191,7 +191,7 @@
}
catch (FormatException e)
{
- Log.Error(e);
+ Log.Error("[Worldmap]:" + e);
strLabel = String.Empty;
return;
}
@@ -199,7 +199,7 @@
strLabel = _stringProvider.GetString("unmapped", dwLabelID);
if (strLabel == null)
{
- Log.Error("No translation found for id {0}", dwLabelID);
+ Log.Error("[Worldmap]: No translation found for id {0}", dwLabelID);
strLabel = String.Empty;
}
}
Modified: trunk/plugins/WorldMap/WorldMap.cs
===================================================================
--- trunk/plugins/WorldMap/WorldMap.cs 2010-02-01 21:39:50 UTC (rev 3405)
+++ trunk/plugins/WorldMap/WorldMap.cs 2010-02-01 21:46:38 UTC (rev 3406)
@@ -60,7 +60,7 @@
}
catch (Exception err)
{
- Log.Error(err);
+ Log.Error("[Worldmap]: " + err);
}
}
@@ -108,7 +108,7 @@
public void RefreshImageTiles()
{
- Log.Debug("[Worldmap] Refreshing Mapimage. lon:lat:zoomL:zoomF:mapT {0}:{1}:{2}:{3}:{4}", currentLongitude, currentLatitude, currentZoomLevel, currentZoomFactor, currentMapType);
+ Log.Debug("[Worldmap]: Refreshing Mapimage. lon:lat:zoomL:zoomF:mapT {0}:{1}:{2}:{3}:{4}", currentLongitude, currentLatitude, currentZoomLevel, currentZoomFactor, currentMapType);
mapTiles.ClearTileDownloadQueue();
@@ -141,9 +141,9 @@
public override bool Init()
{
- Log.Debug("[Worldmap] Start to initialize Worldmap plugin Windows");
+ Log.Debug("[Worldmap]: Start to initialize Worldmap plugin Windows");
- Log.Debug("[Worldmap] Initialize Worldmap menu");
+ Log.Debug("[Worldmap]: Initialize Worldmap menu");
Menu = new WorldmapMenu();
Menu.Init();
@@ -151,14 +151,14 @@
{
GUIWindow win = (GUIWindow)Menu;
GUIWindowManager.Add(ref win);
- Log.Debug("[Worldmap] the window with the ID {0} has been added to the windowmanager!", win.GetID);
+ Log.Debug("[Worldmap]: Window with the ID {0} has been added to the windowmanager!", win.GetID);
}
else
{
- Log.Error("[Worldmap] a window with the ID {0} does already exist!", (int)WorldmapWindowIDs.Menu);
+ Log.Error("[Worldmap]: A window with the ID {0} does already exist!", (int)WorldmapWindowIDs.Menu);
}
- Log.Debug("[Worldmap] Initialize Worldmap search");
+ Log.Debug("[Worldmap]: Initialize Worldmap search");
Search = new WorldmapSearch();
Search.Init();
@@ -166,14 +166,14 @@
{
GUIWindow win = (GUIWindow)Search;
GUIWindowManager.Add(ref win);
- Log.Debug("[Worldmap] the window with the ID {0} has been added to the windowmanager!", win.GetID);
+ Log.Debug("[Worldmap]: Window with the ID {0} has been added to the windowmanager!", win.GetID);
}
else
{
- Log.Error("[Worldmap] a window with the ID {0} does already exist!", (int)WorldmapWindowIDs.Search);
+ Log.Error("[Worldmap]: A window with the ID {0} does already exist!", (int)WorldmapWindowIDs.Search);
}
- Log.Debug("[Worldmap] Initialize Worldmap searchresult");
+ Log.Debug("[Worldmap]: Initialize Worldmap searchresult");
SearchResults = new WorldMapSearchResults();
SearchResults.Init();
@@ -181,11 +181,11 @@
{
GUIWindow win = (GUIWindow)SearchResults;
GUIWindowManager.Add(ref win);
- Log.Debug("[Worldmap] the window with the ID {0} has been added to the windowmanager!", win.GetID);
+ Log.Debug("[Worldmap]: Window with the ID {0} has been added to the windowmanager!", win.GetID);
}
else
{
- Log.Error("[Worldmap] a window with the ID {0} does already exist!", (int)WorldmapWindowIDs.SearchResults);
+ Log.Error("[Worldmap]: A window with the ID {0} does already exist!", (int)WorldmapWindowIDs.SearchResults);
}
@@ -259,7 +259,7 @@
{
if (!File.Exists(Path.Combine(tmpSkinFolder, s)))
{
- Log.Error("{0}: cannot find skin file {1}", Name, s);
+ Log.Error("[Worldmap]: Cannot find skin file {1}", s);
}
}
@@ -273,7 +273,7 @@
}
catch (Exception err)
{
- Log.Error("{0}: error \"{1}\" during texture/bitmap creation", Name, err.Message);
+ Log.Error("[Worldmap]: Error \"{0}\" during texture/bitmap creation", err.Message);
}
LastGraphicContextWidth = (int)GUIGraphicsContext.Width;
@@ -361,7 +361,7 @@
public override void OnAction(Action action)
{
- if (settings.GenerateActionLogEntries) Log.Info("[Worldmap] Detected Action: {0} ID: {1}", action, action.wID);
+ if (settings.GenerateActionLogEntries) Log.Info("[Worldmap]: Detected Action: {0} ID: {1}", action, action.wID);
if (action.wID == settings.ActionMoveRight)
{
@@ -537,7 +537,7 @@
void SetWorldOverview()
{
- //Log.Debug("[Worldmap] Calculating the widest zoome mode");
+ //Log.Debug("[Worldmap]: Calculating the widest zoome mode");
//currentMapType = MapFunctions.MapType.VEHybrid;
currentLongitude = 0;
currentLatitude = 35;
@@ -557,7 +557,7 @@
}
currentZoomLevel = tmpZoomLevel;
- Log.Debug("[Worldmap] Calcalation result: ScreenWidth:MinZoomLevel:mapTiles {0}:{1}:{2}", GUIGraphicsContext.Width, MinZoomLevel, tmpMapTiles);
+ Log.Debug("[Worldmap]: Calculation result: ScreenWidth:MinZoomLevel:mapTiles {0}:{1}:{2}", GUIGraphicsContext.Width, MinZoomLevel, tmpMapTiles);
}
public void ChooseMapType()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|