Converted logging to use log4net.

Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
This commit is contained in:
Jeff Ames
2008-02-05 19:44:27 +00:00
parent 7a61bcff86
commit 6ed5283bc0
173 changed files with 2175 additions and 1950 deletions

View File

@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL
/// </summary>
internal class MSSQLUserData : IUserData
{
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Database manager for MySQL
/// </summary>
@@ -94,7 +96,7 @@ namespace OpenSim.Framework.Data.MSSQL
catch (Exception e)
{
database.Reconnect();
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
return null;
}
}
@@ -103,22 +105,22 @@ namespace OpenSim.Framework.Data.MSSQL
public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
{
MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called");
m_log.Info("[FRIEND]: Stub AddNewUserFriend called");
}
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
{
MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called");
m_log.Info("[FRIEND]: Stub RemoveUserFriend called");
}
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
{
MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called");
m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called");
}
public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
{
MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called");
m_log.Info("[FRIEND]: Stub GetUserFriendList called");
return new List<FriendListItem>();
}
@@ -126,7 +128,7 @@ namespace OpenSim.Framework.Data.MSSQL
public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
{
MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
}
@@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MSSQL
catch (Exception e)
{
database.Reconnect();
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
return returnlist;
}
}
@@ -204,7 +206,7 @@ namespace OpenSim.Framework.Data.MSSQL
catch (Exception e)
{
database.Reconnect();
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
return returnlist;
}
}
@@ -235,7 +237,7 @@ namespace OpenSim.Framework.Data.MSSQL
catch (Exception e)
{
database.Reconnect();
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
return null;
}
}
@@ -290,7 +292,7 @@ namespace OpenSim.Framework.Data.MSSQL
catch (Exception e)
{
database.Reconnect();
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
return null;
}
}
@@ -324,7 +326,7 @@ namespace OpenSim.Framework.Data.MSSQL
catch (Exception e)
{
database.Reconnect();
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
}
}
@@ -426,7 +428,7 @@ namespace OpenSim.Framework.Data.MSSQL
}
catch (Exception e)
{
MainLog.Instance.Error(e.ToString());
m_log.Error(e.ToString());
}
return false;
}