Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:

* Added log4net dependency to physxplugin in prebuild.xml.
* Added missing m_log fields to classes.
* Replaced Console.WriteLine with appropriate m_log.Xxxx
* Tested that nant test target runs succesfully.
* Tested that local opensim sandbox starts up without errors.
GenericGridServerConcept
Charles Krinke 2009-02-22 20:52:55 +00:00
parent 913654f2c9
commit 8f55b9d735
117 changed files with 580 additions and 409 deletions

View File

@ -112,8 +112,7 @@ namespace OpenSim.Data.MSSQL
catch (Exception e)
{
//Are we not in a loop here
//m_log.Error(e.ToString());
Console.WriteLine("[LOG DB] Error logging : " + e.Message);
m_log.Error("[LOG DB] Error logging : " + e.Message);
}
}
}

View File

@ -1030,7 +1030,6 @@ namespace OpenSim.Data.MySQL
{
IDbCommand result = Query(sql, parameters);
//Console.WriteLine(result.CommandText);
// int x;
// if ((x = result.ExecuteNonQuery()) > 0)
// {
@ -1123,7 +1122,6 @@ namespace OpenSim.Data.MySQL
{
IDbCommand result = Query(sql, parameters);
//Console.WriteLine(result.CommandText);
// int x;
// if ((x = result.ExecuteNonQuery()) > 0)
// {

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.MySQL.Tests
{
[TestFixture]
public class MySQLAssetTest : BasicAssetTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -73,4 +76,4 @@ namespace OpenSim.Data.MySQL.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.MySQL.Tests
{
[TestFixture]
public class MySQLEstateTest : BasicEstateTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
@ -56,7 +59,7 @@ namespace OpenSim.Data.MySQL.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error("Exception {0}", e);
Assert.Ignore();
}
}

View File

@ -28,12 +28,16 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.MySQL.Tests
{
[TestFixture]
public class MySQLGridTest : BasicGridTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
@ -54,7 +58,7 @@ namespace OpenSim.Data.MySQL.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error("Exception {0}", e);
Assert.Ignore();
}
}
@ -73,4 +77,4 @@ namespace OpenSim.Data.MySQL.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.MySQL.Tests
{
[TestFixture]
public class MySQLInventoryTest : BasicInventoryTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error("Exception {0}", e);
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.MySQL.Tests
{
[TestFixture]
public class MySQLRegionTest : BasicRegionTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error("Exception {0}", e);
Assert.Ignore();
}
}
@ -87,4 +90,4 @@ namespace OpenSim.Data.MySQL.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.MySQL.Tests
{
[TestFixture]
public class MySQLUserTest : BasicUserTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public MySQLManager database;
public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.MySQL.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error("Exception {0}", e);
Assert.Ignore();
}
}
@ -78,4 +81,4 @@ namespace OpenSim.Data.MySQL.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMsSqlAssetTest : BasicAssetTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -74,4 +77,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMsSqlEstateTest : BasicEstateTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMsSqlGridTest : BasicGridTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMsSqlInventoryTest : BasicInventoryTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMsSqlRegionTest : BasicRegionTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -74,4 +77,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMsSqlUserTest : BasicUserTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMySQLAssetTest : BasicAssetTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMySQLGridTest : BasicGridTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMySQLInventoryTest : BasicInventoryTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMySQLRegionTest : BasicRegionTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -74,4 +77,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMySQLUserTest : BasicUserTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateMySQLEstateTest : BasicEstateTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernatePostgreSQLAssetTest : BasicAssetTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernatePostgreSQLEstateTest : BasicEstateTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernatePostgreSQLGridTest : BasicGridTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernatePostgreSQLInventoryTest : BasicInventoryTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernatePostgreSQLRegionTest : BasicRegionTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -28,12 +28,15 @@
using System;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernatePostgreSQLUserTest : BasicUserTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;";
@ -54,7 +57,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -72,4 +75,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -29,12 +29,15 @@ using System;
using System.IO;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateSQLiteAssetTest : BasicAssetTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -75,4 +78,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -29,12 +29,15 @@ using System;
using System.IO;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateSQLiteEstateTest : BasicEstateTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -29,12 +29,15 @@ using System;
using System.IO;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateSQLiteGridTest : BasicGridTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
public string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3";
@ -55,7 +58,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -73,4 +76,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -29,12 +29,15 @@ using System;
using System.IO;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateSQLiteInventoryTest : BasicInventoryTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}

View File

@ -29,12 +29,15 @@ using System;
using System.IO;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateSQLiteRegionTest : BasicRegionTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -56,7 +59,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -75,4 +78,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}

View File

@ -29,12 +29,16 @@ using System;
using System.IO;
using NUnit.Framework;
using OpenSim.Data.Tests;
using log4net;
using System.Reflection;
namespace OpenSim.Data.NHibernate.Tests
{
[TestFixture]
public class NHibernateSQLiteUserTest : BasicUserTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string file;
public NHibernateManager database;
@ -56,7 +60,7 @@ namespace OpenSim.Data.NHibernate.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception {0}", e);
m_log.Error(e.ToString());
Assert.Ignore();
}
}
@ -74,4 +78,4 @@ namespace OpenSim.Data.NHibernate.Tests
}
}
}
}
}

View File

@ -31,11 +31,14 @@ using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenSim.Framework;
using log4net;
using System.Reflection;
namespace OpenSim.Data.Tests
{
public class BasicAssetTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public AssetDataBase db;
public UUID uuid1;
public UUID uuid2;

View File

@ -33,11 +33,14 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using System.Text;
using log4net;
using System.Reflection;
namespace OpenSim.Data.Tests
{
public class BasicEstateTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public IEstateDataStore db;
public IRegionDataStore regionDb;

View File

@ -32,11 +32,14 @@ using log4net.Config;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using log4net;
using System.Reflection;
namespace OpenSim.Data.Tests
{
public class BasicGridTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public GridDataBase db;
public UUID region1, region2, region3;
public UUID zero = UUID.Zero;

View File

@ -31,11 +31,14 @@ using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenSim.Framework;
using log4net;
using System.Reflection;
namespace OpenSim.Data.Tests
{
public class BasicInventoryTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public IInventoryDataPlugin db;
public UUID zero = UUID.Zero;

View File

@ -36,11 +36,14 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using System.Reflection;
namespace OpenSim.Data.Tests
{
public class BasicRegionTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public IRegionDataStore db;
public UUID zero = UUID.Zero;
public UUID region1;
@ -139,7 +142,7 @@ namespace OpenSim.Data.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception in storing object {0} {1}", sog.ToString(), e);
m_log.Error(e.ToString());
Assert.Fail();
}
@ -149,7 +152,7 @@ namespace OpenSim.Data.Tests
}
catch (Exception e)
{
Console.WriteLine("Exception in storing object {0} {1}", sog2.ToString(), e);
m_log.Error(e.ToString());
Assert.Fail();
}

View File

@ -35,11 +35,14 @@ using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenSim.Framework;
using log4net;
using System.Reflection;
namespace OpenSim.Data.Tests
{
public class BasicUserTest
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public IUserDataPlugin db;
public UUID user1;
public UUID user2;

View File

@ -122,7 +122,7 @@ namespace OpenSim.Framework
AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
AgentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID;
// Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
// m_log.Debug("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
}
}

View File

@ -291,17 +291,17 @@ namespace OpenSim.Framework
+ 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
- m_avatarHeight / 2) * 0.3f - 0.04f;
//System.Console.WriteLine(">>>>>>> [APPEARANCE]: Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset);
//System.Console.WriteLine("------------- Set Appearance Texture ---------------");
//m_log.Debug(">>>>>>> [APPEARANCE]: Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset);
//m_log.Debug("------------- Set Appearance Texture ---------------");
//Primitive.TextureEntryFace[] faces = Texture.FaceTextures;
//foreach (Primitive.TextureEntryFace face in faces)
//{
// if (face != null)
// System.Console.WriteLine(" ++ " + face.TextureID);
// m_log.Debug(" ++ " + face.TextureID);
// else
// System.Console.WriteLine(" ++ NULL ");
// m_log.Debug(" ++ NULL ");
//}
//System.Console.WriteLine("----------------------------");
//m_log.Debug("----------------------------");
}
@ -350,7 +350,7 @@ namespace OpenSim.Framework
m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float));
//System.Console.WriteLine("AvatarAppearance Deserialize END");
//m_log.Debug("AvatarAppearance Deserialize END");
}
// this is used for OGS1

View File

@ -50,7 +50,7 @@ namespace OpenSim.Framework
protected AvatarWearable(SerializationInfo info, StreamingContext context)
{
//System.Console.WriteLine("AvatarWearable Deserialize BGN");
//m_log.Debug("AvatarWearable Deserialize BGN");
if (info == null)
{
throw new ArgumentNullException("info");
@ -59,7 +59,7 @@ namespace OpenSim.Framework
AssetID = new UUID((Guid) info.GetValue("AssetID", typeof (Guid)));
ItemID = new UUID((Guid) info.GetValue("ItemID", typeof (Guid)));
//System.Console.WriteLine("AvatarWearable Deserialize END");
//m_log.Debug("AvatarWearable Deserialize END");
}
public static AvatarWearable[] DefaultWearables

View File

@ -576,10 +576,10 @@ namespace OpenSim.Framework
public void Dump()
{
System.Console.WriteLine("------------ AgentData ------------");
System.Console.WriteLine("UUID: " + AgentID);
System.Console.WriteLine("Region: " + RegionHandle);
System.Console.WriteLine("Position: " + Position);
m_log.Info("------------ AgentData ------------");
m_log.Info("UUID: " + AgentID);
m_log.Info("Region: " + RegionHandle);
m_log.Info("Position: " + Position);
}
}
*/

View File

@ -510,11 +510,11 @@ namespace OpenSim.Framework.Communications.Cache
//inventory asset request
requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = 3;
//Console.WriteLine("asset request " + requestID);
//m_log.Debug("asset request " + requestID);
}
//check to see if asset is in local cache, if not we need to request it from asset server.
//Console.WriteLine("asset request " + requestID);
//m_log.Debug("asset request " + requestID);
if (!m_memcache.Contains(requestID))
{
//not found asset

View File

@ -464,7 +464,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <returns></returns>
public string RequestTexture(string request, string path, string param)
{
System.Console.WriteLine("texture request " + request);
m_log.Debug("texture request " + request);
// Needs implementing (added to remove compiler warning)
return String.Empty;
}
@ -670,7 +670,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
}
//System.Console.WriteLine("asset upload request via CAPS" + llsdRequest.inventory_type +" , "+ llsdRequest.asset_type);
//m_log.Debug("asset upload request via CAPS" + llsdRequest.inventory_type +" , "+ llsdRequest.asset_type);
string assetName = llsdRequest.name;
string assetDes = llsdRequest.description;

View File

@ -126,7 +126,7 @@ namespace OpenSim.Framework.Console
if (!dict.ContainsKey(helpPart))
break;
//System.Console.WriteLine("Found {0}", helpParts[0]);
//m_log.Debug("Found {0}", helpParts[0]);
if (dict[helpPart] is Dictionary<string, Object>)
dict = (Dictionary<string, object>)dict[helpPart];

View File

@ -58,7 +58,7 @@ namespace OpenSim.Framework
{
string userServerURI = ServerURI(userserver);
bool ret = (((userServerURI == null) || (userServerURI == "") || (userServerURI == LocalUserServerURI)));
//Console.WriteLine("-------------> HGNetworkServersInfo.IsLocalUser? " + ret + "(userServer=" + userServerURI + "; localuserserver=" + LocalUserServerURI + ")");
//m_log.Debug("-------------> HGNetworkServersInfo.IsLocalUser? " + ret + "(userServer=" + userServerURI + "; localuserserver=" + LocalUserServerURI + ")");
return ret;
}

View File

@ -700,8 +700,7 @@ namespace OpenSim.Framework
}
catch (Exception e)
{
System.Console.WriteLine(e.Message);
System.Console.WriteLine(e.StackTrace);
m_log.Error(e.ToString());
}
finally
{
@ -728,8 +727,7 @@ namespace OpenSim.Framework
}
catch (Exception e)
{
System.Console.WriteLine(e.Message);
System.Console.WriteLine(e.StackTrace);
m_log.Error(e.ToString());
}
finally
{

View File

@ -264,7 +264,7 @@ namespace OpenSim.Framework
foreach (string line in lines)
{
string trimLine = line.Trim();
// Console.WriteLine("line : " + trimLine);
// m_log.Debug("line : " + trimLine);
string[] splitLine = r.Split(trimLine);
if (splitLine.Length > 1)

View File

@ -28,11 +28,15 @@
using System;
using Nini.Config;
using log4net.Config;
using log4net;
using System.Reflection;
namespace OpenSim.Grid.AssetInventoryServer
{
class MainEntry
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
static void Main(string[] args)
{
XmlConfigurator.Configure();
@ -46,7 +50,7 @@ namespace OpenSim.Grid.AssetInventoryServer
Console.CancelKeyPress +=
delegate(object sender, ConsoleCancelEventArgs e)
{
Console.WriteLine("AssetInventory server is shutting down...");
m_log.Info("AssetInventory server is shutting down...");
server.Shutdown();
Environment.Exit(0);
};

View File

@ -182,7 +182,7 @@ namespace OpenSim.Grid.GridServer
public string RestSetSimMethod(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
Console.WriteLine("Processing region update via REST method");
m_log.Info("Processing region update via REST method");
RegionProfileData theSim;
theSim = m_gridDBService.GetRegion(new UUID(param));
if (theSim == null)

View File

@ -627,7 +627,7 @@ namespace OpenSim.Grid.GridServer
else if (requestData.ContainsKey("region_handle"))
{
//CFK: The if/else below this makes this message redundant.
//CFK: Console.WriteLine("requesting data for region " + (string) requestData["region_handle"]);
//CFK: m_log.Info("requesting data for region " + (string) requestData["region_handle"]);
ulong regionHandle = Convert.ToUInt64((string)requestData["region_handle"]);
simData = m_gridDBService.GetRegion(regionHandle);
if (simData == null)

View File

@ -402,7 +402,7 @@ namespace OpenSim.Grid.UserServer
Hashtable requestData = (Hashtable) request.Params[0];
UserProfileData userProfile;
//CFK: this clogs the UserServer log and is not necessary at this time.
//CFK: Console.WriteLine("METHOD BY UUID CALLED");
//CFK: m_log.Debug("METHOD BY UUID CALLED");
if (requestData.Contains("avatar_uuid"))
{
try
@ -435,7 +435,7 @@ namespace OpenSim.Grid.UserServer
Hashtable requestData = (Hashtable) request.Params[0];
UserProfileData userProfile;
//CFK: this clogs the UserServer log and is not necessary at this time.
//CFK: Console.WriteLine("METHOD BY UUID CALLED");
//CFK: m_log.Debug("METHOD BY UUID CALLED");
if (requestData.Contains("avatar_uuid"))
{
UUID guess;

View File

@ -55,15 +55,15 @@ namespace OpenSim
XmlConfigurator.Configure();
Console.Write("Performing compatibility checks... ");
m_log.Info("Performing compatibility checks... ");
string supported = String.Empty;
if (Util.IsEnvironmentSupported(ref supported))
{
Console.WriteLine(" Environment is compatible.\n");
m_log.Info("Environment is compatible.\n");
}
else
{
Console.WriteLine(" Environment is unsupported (" + supported + ")\n");
m_log.Warn("Environment is unsupported (" + supported + ")\n");
}
Culture.SetCurrentCulture();
@ -115,7 +115,7 @@ namespace OpenSim
}
catch (Exception e)
{
Console.WriteLine("Caught exception from command: {0}", e);
m_log.Error("Caught exception from command: {0}", e);
}
}
}

View File

@ -265,7 +265,7 @@ namespace OpenSim
if (m_configSettings.StorageDll == "OpenSim.DataStore.MonoSqlite.dll")
{
m_configSettings.StorageDll = "OpenSim.Data.SQLite.dll";
Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll.");
m_log.Warn("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll.");
Thread.Sleep(3000);
}

View File

@ -192,7 +192,7 @@ namespace OpenSim
for (int i = 3; i < cmdparams.Count; i++)
mapName += " " + cmdparams[i];
Console.WriteLine(">> MapName: " + mapName);
m_log.Info(">> MapName: " + mapName);
//internalPort = Convert.ToUInt32(cmdparams[4]);
//remotingPort = Convert.ToUInt32(cmdparams[5]);
}
@ -285,7 +285,7 @@ namespace OpenSim
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
m_log.Error(e.ToString());
}
}
@ -323,9 +323,9 @@ namespace OpenSim
private void LinkRegionCmdUsage()
{
Console.WriteLine("Usage: link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>]");
Console.WriteLine("Usage: link-region <Xloc> <Yloc> <HostName> <HttpPort> [<LocalName>]");
Console.WriteLine("Usage: link-region <URI_of_xml> [<exclude>]");
m_log.Info("Usage: link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>]");
m_log.Info("Usage: link-region <Xloc> <Yloc> <HostName> <HttpPort> [<LocalName>]");
m_log.Info("Usage: link-region <URI_of_xml> [<exclude>]");
}
}
}

View File

@ -1877,7 +1877,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bulkUpdate.AgentData.TransactionID = transactionId;
bulkUpdate.FolderData = folderDataBlocks.ToArray();
//Console.WriteLine("SendBulkUpdateInventory :" + bulkUpdate);
//m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate);
OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
}
}
@ -1920,7 +1920,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
items.RemoveAt(items.Count - 1);
}
//Console.WriteLine("SendBulkUpdateInventoryRecursive :" + bulkUpdate);
//m_log.Debug("SendBulkUpdateInventoryRecursive :" + bulkUpdate);
OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
folderDataBlocks = new List<BulkUpdateInventoryPacket.FolderDataBlock>();
@ -3101,7 +3101,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
packet.ParamList = returnblock;
packet.Header.Reliable = false;
//System.Console.WriteLine("[ESTATE]: SIM--->" + packet.ToString());
//m_log.Debug("[ESTATE]: SIM--->" + packet.ToString());
OutPacket(packet, ThrottleOutPacketType.Task);
}
@ -3895,7 +3895,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <returns></returns>
protected bool AgentTextureCached(IClientAPI simclient, Packet packet)
{
//Console.WriteLine("texture cached: " + packet.ToString());
//m_log.Debug("texture cached: " + packet.ToString());
AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet;
AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse);
// TODO: don't create new blocks if recycling an old packet
@ -3924,7 +3924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected bool MultipleObjUpdate(IClientAPI simClient, Packet packet)
{
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
// Console.WriteLine("new multi update packet " + multipleupdate.ToString());
// m_log.Debug("new multi update packet " + multipleupdate.ToString());
Scene tScene = (Scene)m_scene;
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
@ -3956,7 +3956,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
{
// Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
handlerUpdatePrimSinglePosition(localId, pos1, this);
}
break;
@ -3966,7 +3966,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
if (handlerUpdatePrimSingleRotation != null)
{
//Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
//m_log.Debug("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
handlerUpdatePrimSingleRotation(localId, rot1, this);
}
break;
@ -3976,7 +3976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
if (handlerUpdatePrimSingleRotation != null)
{
//Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
//m_log.Debug("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
handlerUpdatePrimSingleRotation(localId, rot2, this);
}
break;
@ -3988,7 +3988,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale1, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
@ -4026,8 +4026,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
if (handlerUpdatePrimGroupRotation != null)
{
//Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
//m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// m_log.Debug("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
handlerUpdatePrimGroupRotation(localId, pos3, rot4, this);
}
break;
@ -4038,12 +4038,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
//Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
//m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale2, this);
// Change the position based on scale (for bug number 246)
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
// Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, pos4, this);
@ -4057,7 +4057,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimGroupScale(localId, scale5, this);
handlerUpdateVector = OnUpdatePrimGroupPosition;
@ -4074,7 +4074,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale6, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
@ -4733,7 +4733,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData;
AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data;
//Console.WriteLine("Agent Sends:" + Utils.BytesToString(querydata.Name));
//m_log.Debug("Agent Sends:" + Utils.BytesToString(querydata.Name));
handlerAvatarPickerRequest = OnAvatarPickerRequest;
if (handlerAvatarPickerRequest != null)
@ -5285,7 +5285,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
case PacketType.RequestImage:
RequestImagePacket imageRequest = (RequestImagePacket)Pack;
//Console.WriteLine("image request: " + Pack.ToString());
//m_log.Debug("image request: " + Pack.ToString());
//handlerTextureRequest = null;
@ -5311,10 +5311,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.TransferRequest:
//Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
//m_log.Debug("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
TransferRequestPacket transfer = (TransferRequestPacket)Pack;
//Console.WriteLine("Transfer Request: " + transfer.ToString());
//m_log.Debug("Transfer Request: " + transfer.ToString());
// Validate inventory transfers
// Has to be done here, because AssetCache can't do it
//
@ -5409,8 +5409,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break;
case PacketType.AssetUploadRequest:
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
// Console.WriteLine("upload request " + request.ToString());
// Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
// m_log.Debug("upload request " + request.ToString());
// m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
handlerAssetUploadRequest = OnAssetUploadRequest;
@ -5606,7 +5606,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
}
//Console.WriteLine(Pack.ToString());
//m_log.Debug(Pack.ToString());
/*for (int i = 0; i < update.InventoryData.Length; i++)
{
if (update.InventoryData[i].TransactionID != UUID.Zero)
@ -5614,7 +5614,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId));
if (asset != null)
{
// Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToString() + " already in cache");
// m_log.Debug("updating inventory item, found asset" + asset.FullID.ToString() + " already in cache");
m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
}
else
@ -5622,12 +5622,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
if (asset != null)
{
//Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToString() + " to cache");
//m_log.Debug("updating inventory item, adding asset" + asset.FullID.ToString() + " to cache");
m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
}
else
{
//Console.WriteLine("trying to update inventory item, but asset is null");
//m_log.Debug("trying to update inventory item, but asset is null");
}
}
}
@ -5778,7 +5778,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break;
case PacketType.RezScript:
//Console.WriteLine(Pack.ToString());
//m_log.Debug(Pack.ToString());
RezScriptPacket rezScriptx = (RezScriptPacket)Pack;
handlerRezScript = OnRezScript;
@ -5894,7 +5894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
case PacketType.TeleportLocationRequest:
TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack;
// Console.WriteLine(tpLocReq.ToString());
// m_log.Debug(tpLocReq.ToString());
handlerTeleportLocationRequest = OnTeleportLocationRequest;
if (handlerTeleportLocationRequest != null)
@ -6070,7 +6070,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
case PacketType.ParcelObjectOwnersRequest:
//Console.WriteLine(Pack.ToString());
//m_log.Debug(Pack.ToString());
ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack;
handlerParcelObjectOwnerRequest = OnParcelObjectOwnerRequest;
@ -6135,7 +6135,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
case PacketType.EstateOwnerMessage:
EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
//System.Console.WriteLine(messagePacket.ToString());
//m_log.Debug(messagePacket.ToString());
switch (Utils.BytesToString(messagePacket.MethodData.Method))
{
case "getinfo":
@ -6663,7 +6663,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
case PacketType.MapItemRequest:
MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
//System.Console.WriteLine(mirpk.ToString());
//m_log.Debug(mirpk.ToString());
handlerMapItemRequest = OnMapItemRequest;
if (handlerMapItemRequest != null)
{
@ -6711,7 +6711,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break;
case PacketType.DirPlacesQuery:
DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack;
//Console.WriteLine(dirPlacesQueryPacket.ToString());
//m_log.Debug(dirPlacesQueryPacket.ToString());
handlerDirPlacesQuery = OnDirPlacesQuery;
if (handlerDirPlacesQuery != null)
@ -7674,7 +7674,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendAsset(AssetRequestToClient req)
{
//Console.WriteLine("sending asset " + req.RequestAssetID);
//m_log.Debug("sending asset " + req.RequestAssetID);
TransferInfoPacket Transfer = new TransferInfoPacket();
Transfer.TransferInfo.ChannelType = 2;
Transfer.TransferInfo.Status = 0;
@ -8161,7 +8161,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
mrdata.Name = Utils.StringToBytes(replies[i].name);
mirplk.Data[i] = mrdata;
}
//System.Console.WriteLine(mirplk.ToString());
//m_log.Debug(mirplk.ToString());
OutPacket(mirplk, ThrottleOutPacketType.Task);
}

View File

@ -32,6 +32,8 @@ using OpenMetaverse;
using OpenMetaverse.Imaging;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using log4net;
using System.Reflection;
namespace OpenSim.Region.ClientStack.LindenUDP
{
@ -41,6 +43,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary>
public class LLImageManager
{
/// <summary>
/// Priority Queue for images. Contains lots of data
/// </summary>
@ -114,7 +117,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_shuttingdown)
return;
//Console.WriteLine("AssetCallback for assetId" + assetID);
//m_log.Debug("AssetCallback for assetId" + assetID);
if (asset == null || asset.Data == null)
{
@ -249,7 +252,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
// uncomment the following line to see the upper most asset and the priority
//Console.WriteLine(process.ToString());
//m_log.Debug(process.ToString());
// Lower priority to give the next image a chance to bubble up
pq[h] -= 50000;
@ -359,6 +362,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary>
public class J2KImage
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private AssetBase m_asset_ref = null;
public volatile int LastPacketNum = 0;
public volatile int DiscardLimit = 0;
@ -550,7 +554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
try { Buffer.BlockCopy(m_asset_ref.Data, 0, firstImageData, 0, FIRST_IMAGE_PACKET_SIZE); }
catch (Exception)
{
Console.WriteLine(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(), firstImageData.Length, FIRST_IMAGE_PACKET_SIZE));
m_log.Error(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(), firstImageData.Length, FIRST_IMAGE_PACKET_SIZE));
//m_log.Error("Texture data copy failed on first packet for " + m_asset_ref.FullID.ToString());
//m_cancel = true;
@ -569,8 +573,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//if (imagePacketSize > 0)
// imagePacketSize = IMAGE_PACKET_SIZE;
//if (imagePacketSize != 1000)
// Console.WriteLine("ENdPacket");
//Console.WriteLine(String.Format("srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(),0, imagePacketSize));
// m_log.Debug("ENdPacket");
//m_log.Debug(String.Format("srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize{3}", m_asset_ref.Data.Length, CurrentBytePosition(),0, imagePacketSize));
bool atEnd = false;
@ -591,9 +595,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
try { Buffer.BlockCopy(m_asset_ref.Data, CurrentBytePosition(), imageData, 0, imagePacketSize); }
catch (Exception e)
{
Console.WriteLine(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize:{3}, currpak:{4}, stoppak:{5}, totalpak:{6}", m_asset_ref.Data.Length, CurrentBytePosition(),
m_log.Error(String.Format("Err: srcLen:{0}, BytePos:{1}, desLen:{2}, pktsize:{3}, currpak:{4}, stoppak:{5}, totalpak:{6}", m_asset_ref.Data.Length, CurrentBytePosition(),
imageData.Length, imagePacketSize, CurrentPacket, StopPacket, TexturePacketCount()));
Console.WriteLine(e.ToString());
m_log.Error(e.ToString());
//m_log.Error("Texture data copy failed for " + m_asset_ref.FullID.ToString());
//m_cancel = true;
//m_sending = false;

View File

@ -57,8 +57,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender)
{
numBytes = 0;
//System.Console.WriteLine("Queue size " + m_chunksToLoad.Count);
//m_log.Debug("Queue size " + m_chunksToLoad.Count);
if (m_chunksToLoad.Count <= 0)
return false;
@ -150,4 +150,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
Sender = sender;
}
}
}
}

View File

@ -193,7 +193,7 @@ namespace OpenSim.Region.Communications.Hypergrid
{
if (reg.RegionLocX != x || reg.RegionLocY != y)
{
//Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location");
//m_log.Debug("CommsManager- RequestNeighbours() - found a different region in list, checking location");
if ((reg.RegionLocX > (x - 2)) && (reg.RegionLocX < (x + 2)))
{
if ((reg.RegionLocY > (y - 2)) && (reg.RegionLocY < (y + 2)))
@ -239,10 +239,10 @@ namespace OpenSim.Region.Communications.Hypergrid
/// <returns></returns>
public virtual RegionInfo RequestNeighbourInfo(ulong regionHandle)
{
//Console.WriteLine(" >> RequestNeighbourInfo for " + regionHandle);
//m_log.Debug(" >> RequestNeighbourInfo for " + regionHandle);
foreach (RegionInfo info in m_hyperlinkRegions)
{
//Console.WriteLine(" .. " + info.RegionHandle);
//m_log.Debug(" .. " + info.RegionHandle);
if (info.RegionHandle == regionHandle) return info;
}
@ -250,7 +250,7 @@ namespace OpenSim.Region.Communications.Hypergrid
{
if (info.RegionHandle == regionHandle)
{
//Console.WriteLine("XXX------ known region " + info.RegionHandle);
//m_log.Debug("XXX------ known region " + info.RegionHandle);
return info;
}
}
@ -291,7 +291,7 @@ namespace OpenSim.Region.Communications.Hypergrid
map.Y = (ushort)regInfo.RegionLocY;
map.WaterHeight = (byte)regInfo.RegionSettings.WaterHeight;
map.MapImageId = regInfo.RegionSettings.TerrainImageID;
// Console.WriteLine("ImgID: " + map.MapImageId);
// m_log.Debug("ImgID: " + map.MapImageId);
map.Agents = 1;
map.RegionFlags = 72458694;
map.Access = 13;
@ -312,10 +312,10 @@ namespace OpenSim.Region.Communications.Hypergrid
WebClient c = new WebClient();
string uri = "http://" + info.ExternalHostName + ":" + info.HttpPort + "/index.php?method=" + regionimage;
//Console.WriteLine("JPEG: " + uri);
//m_log.Debug("JPEG: " + uri);
c.DownloadFile(uri, info.RegionID.ToString() + ".jpg");
Bitmap m = new Bitmap(info.RegionID.ToString() + ".jpg");
//Console.WriteLine("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
//m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
byte[] imageData = OpenJPEG.EncodeFromImage(m, true);
AssetBase ass = new AssetBase(UUID.Random(), "region " + info.RegionID.ToString());
info.RegionSettings.TerrainImageID = ass.FullID;
@ -327,7 +327,7 @@ namespace OpenSim.Region.Communications.Hypergrid
}
catch // LEGIT: Catching problems caused by OpenJPEG p/invoke
{
Console.WriteLine("[HGrid]: Failed getting/storing map image, because it is probably already in the cache");
m_log.Warn("[HGrid]: Failed getting/storing map image, because it is probably already in the cache");
}
}
@ -435,7 +435,7 @@ namespace OpenSim.Region.Communications.Hypergrid
{
hash = (Hashtable)response.Value;
//foreach (Object o in hash)
// Console.WriteLine(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
// m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
try
{
UUID.TryParse((string)hash["uuid"], out uuid);
@ -443,7 +443,7 @@ namespace OpenSim.Region.Communications.Hypergrid
if ((string)hash["handle"] != null)
{
info.regionSecret = (string)hash["handle"];
//Console.WriteLine(">> HERE: " + info.regionSecret);
//m_log.Debug(">> HERE: " + info.regionSecret);
}
if (hash["region_image"] != null)
{
@ -454,18 +454,18 @@ namespace OpenSim.Region.Communications.Hypergrid
if (hash["region_name"] != null)
{
info.RegionName = (string)hash["region_name"];
//Console.WriteLine(">> " + info.RegionName);
//m_log.Debug(">> " + info.RegionName);
}
if (hash["internal_port"] != null)
{
int port = Convert.ToInt32((string)hash["internal_port"]);
info.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
//Console.WriteLine(">> " + info.InternalEndPoint.ToString());
//m_log.Debug(">> " + info.InternalEndPoint.ToString());
}
if (hash["remoting_port"] != null)
{
info.RemotingPort = Convert.ToUInt32(hash["remoting_port"]);
//Console.WriteLine(">> " + info.RemotingPort);
//m_log.Debug(">> " + info.RemotingPort);
}
}
@ -508,12 +508,12 @@ namespace OpenSim.Region.Communications.Hypergrid
Hashtable hash = new Hashtable();
hash["uuid"] = regInfo.RegionID.ToString();
hash["handle"] = regInfo.RegionHandle.ToString();
//Console.WriteLine(">> Here " + regInfo.RegionHandle);
//m_log.Debug(">> Here " + regInfo.RegionHandle);
hash["region_image"] = regInfo.RegionSettings.TerrainImageID.ToString();
hash["region_name"] = regInfo.RegionName;
hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString();
hash["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
//Console.WriteLine(">> Here: " + regInfo.InternalEndPoint.Port);
//m_log.Debug(">> Here: " + regInfo.InternalEndPoint.Port);
XmlRpcResponse response = new XmlRpcResponse();
@ -553,9 +553,9 @@ namespace OpenSim.Region.Communications.Hypergrid
if (u != null && u.UserProfile != null)
{
loginParams["region_uuid"] = u.UserProfile.HomeRegionID.ToString(); // This seems to be always Zero
//Console.WriteLine(" --------- Home Region UUID -------");
//Console.WriteLine(" >> " + loginParams["region_uuid"] + " <<");
//Console.WriteLine(" --------- ---------------- -------");
//m_log.Debug(" --------- Home Region UUID -------");
//m_log.Debug(" >> " + loginParams["region_uuid"] + " <<");
//m_log.Debug(" --------- ---------------- -------");
string serverURI = "";
if (u.UserProfile is ForeignUserProfileData)
@ -577,7 +577,7 @@ namespace OpenSim.Region.Communications.Hypergrid
if (!IsLocalUser(u))
{
loginParams["regionhandle"] = rinfo.regionSecret; // user.CurrentAgent.Handle.ToString();
//Console.WriteLine("XXX--- informregionofuser (foreign user) here handle: " + rinfo.regionSecret);
//m_log.Debug("XXX--- informregionofuser (foreign user) here handle: " + rinfo.regionSecret);
loginParams["home_address"] = ((ForeignUserProfileData)(u.UserProfile)).UserHomeAddress;
loginParams["home_port"] = ((ForeignUserProfileData)(u.UserProfile)).UserHomePort;
@ -585,7 +585,7 @@ namespace OpenSim.Region.Communications.Hypergrid
}
else
{
//Console.WriteLine("XXX--- informregionofuser (local user) here handle: " + rinfo.regionSecret);
//m_log.Debug("XXX--- informregionofuser (local user) here handle: " + rinfo.regionSecret);
//// local user about to jump out, let's process the name
// On second thoughts, let's not do this for the *user*; let's only do it for the *agent*
@ -596,9 +596,9 @@ namespace OpenSim.Region.Communications.Hypergrid
loginParams["regionhandle"] = u.UserProfile.HomeRegion.ToString(); // user.CurrentAgent.Handle.ToString();
loginParams["home_address"] = rinfo.ExternalHostName;
Console.WriteLine(" --------- Home Address -------");
Console.WriteLine(" >> " + loginParams["home_address"] + " <<");
Console.WriteLine(" --------- ------------ -------");
m_log.Debug(" --------- Home Address -------");
m_log.Debug(" >> " + loginParams["home_address"] + " <<");
m_log.Debug(" --------- ------------ -------");
loginParams["home_port"] = rinfo.HttpPort.ToString();
loginParams["home_remoting"] = NetworkServersInfo.RemotingListenerPort.ToString(); ;
}
@ -614,7 +614,7 @@ namespace OpenSim.Region.Communications.Hypergrid
// Send
string uri = "http://" + regInfo.ExternalHostName + ":" + regInfo.HttpPort + "/";
//Console.WriteLine("XXX uri: " + uri);
//m_log.Debug("XXX uri: " + uri);
XmlRpcRequest request = new XmlRpcRequest("expect_hg_user", SendParams);
XmlRpcResponse reply;
try
@ -722,7 +722,7 @@ namespace OpenSim.Region.Communications.Hypergrid
else
{
// Finally, everything looks ok
//Console.WriteLine("XXX---- EVERYTHING OK ---XXX");
//m_log.Debug("XXX---- EVERYTHING OK ---XXX");
// 1 - Preload the user data
m_userProfileCache.PreloadUserCache(userData.ID, userData);
@ -744,7 +744,7 @@ namespace OpenSim.Region.Communications.Hypergrid
rinfo.RegionLocX = 0;
rinfo.RegionLocY = (uint)(random.Next(0, Int32.MaxValue)); //(uint)m_knownRegions.Count;
rinfo.regionSecret = userRegionHandle.ToString();
//Console.WriteLine("XXX--- Here: handle = " + rinfo.regionSecret);
//m_log.Debug("XXX--- Here: handle = " + rinfo.regionSecret);
try
{
rinfo.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)userhomeinternalport);
@ -828,7 +828,7 @@ namespace OpenSim.Region.Communications.Hypergrid
if ((uinfo != null) && (uinfo.UserProfile != null) &&
(IsLocalUser(uinfo) || !(uinfo.UserProfile is ForeignUserProfileData)))
{
//Console.WriteLine("---------------> Local User!");
//m_log.Debug("---------------> Local User!");
string[] parts = agentData.firstname.Split(new char[] { '.' });
if (parts.Length == 2)
{
@ -837,7 +837,7 @@ namespace OpenSim.Region.Communications.Hypergrid
}
}
//else
// Console.WriteLine("---------------> Foreign User!");
// m_log.Debug("---------------> Foreign User!");
}
#endregion
@ -938,31 +938,31 @@ namespace OpenSim.Region.Communications.Hypergrid
private void DumpUserData(ForeignUserProfileData userData)
{
Console.WriteLine(" ------------ User Data Dump ----------");
Console.WriteLine(" >> Name: " + userData.FirstName + " " + userData.SurName);
Console.WriteLine(" >> HomeID: " + userData.HomeRegionID);
Console.WriteLine(" >> HomeHandle: " + userData.HomeRegion);
Console.WriteLine(" >> HomeX: " + userData.HomeRegionX);
Console.WriteLine(" >> HomeY: " + userData.HomeRegionY);
Console.WriteLine(" >> UserServer: " + userData.UserServerURI);
Console.WriteLine(" >> InvServer: " + userData.UserInventoryURI);
Console.WriteLine(" >> AssetServer: " + userData.UserAssetURI);
Console.WriteLine(" ------------ -------------- ----------");
m_log.Info(" ------------ User Data Dump ----------");
m_log.Info(" >> Name: " + userData.FirstName + " " + userData.SurName);
m_log.Info(" >> HomeID: " + userData.HomeRegionID);
m_log.Info(" >> HomeHandle: " + userData.HomeRegion);
m_log.Info(" >> HomeX: " + userData.HomeRegionX);
m_log.Info(" >> HomeY: " + userData.HomeRegionY);
m_log.Info(" >> UserServer: " + userData.UserServerURI);
m_log.Info(" >> InvServer: " + userData.UserInventoryURI);
m_log.Info(" >> AssetServer: " + userData.UserAssetURI);
m_log.Info(" ------------ -------------- ----------");
}
private void DumpRegionData(RegionInfo rinfo)
{
Console.WriteLine(" ------------ Region Data Dump ----------");
Console.WriteLine(" >> handle: " + rinfo.RegionHandle);
Console.WriteLine(" >> coords: " + rinfo.RegionLocX + ", " + rinfo.RegionLocY);
Console.WriteLine(" >> secret: " + rinfo.regionSecret);
Console.WriteLine(" >> remoting address: " + rinfo.RemotingAddress);
Console.WriteLine(" >> remoting port: " + rinfo.RemotingPort);
Console.WriteLine(" >> external host name: " + rinfo.ExternalHostName);
Console.WriteLine(" >> http port: " + rinfo.HttpPort);
Console.WriteLine(" >> external EP address: " + rinfo.ExternalEndPoint.Address);
Console.WriteLine(" >> external EP port: " + rinfo.ExternalEndPoint.Port);
Console.WriteLine(" ------------ -------------- ----------");
m_log.Info(" ------------ Region Data Dump ----------");
m_log.Info(" >> handle: " + rinfo.RegionHandle);
m_log.Info(" >> coords: " + rinfo.RegionLocX + ", " + rinfo.RegionLocY);
m_log.Info(" >> secret: " + rinfo.regionSecret);
m_log.Info(" >> remoting address: " + rinfo.RemotingAddress);
m_log.Info(" >> remoting port: " + rinfo.RemotingPort);
m_log.Info(" >> external host name: " + rinfo.ExternalHostName);
m_log.Info(" >> http port: " + rinfo.HttpPort);
m_log.Info(" >> external EP address: " + rinfo.ExternalEndPoint.Address);
m_log.Info(" >> external EP port: " + rinfo.ExternalEndPoint.Port);
m_log.Info(" ------------ -------------- ----------");
}

View File

@ -84,10 +84,10 @@ namespace OpenSim.Region.Communications.Local
/// <returns></returns>
public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
{
//Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
//m_log.Debug("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
if (!m_regions.ContainsKey(regionInfo.RegionHandle))
{
//Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle);
//m_log.Debug("CommsManager - Adding Region " + regionInfo.RegionHandle);
m_regions.Add(regionInfo.RegionHandle, regionInfo);
RegionCommsListener regionHost = new RegionCommsListener();
@ -145,15 +145,15 @@ namespace OpenSim.Region.Communications.Local
/// <returns></returns>
public List<SimpleRegionInfo> RequestNeighbours(uint x, uint y)
{
// Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle);
// m_log.Debug("Finding Neighbours to " + regionInfo.RegionHandle);
List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
foreach (RegionInfo reg in m_regions.Values)
{
// Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY);
// m_log.Debug("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY);
if (reg.RegionLocX != x || reg.RegionLocY != y)
{
//Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location");
//m_log.Debug("CommsManager- RequestNeighbours() - found a different region in list, checking location");
if ((reg.RegionLocX > (x - 2)) && (reg.RegionLocX < (x + 2)))
{
if ((reg.RegionLocY > (y - 2)) && (reg.RegionLocY < (y + 2)))

View File

@ -29,11 +29,14 @@ using System;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Communications.Local
{
public class LocalUserServices : UserManagerBase
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly uint m_defaultHomeX;
private readonly uint m_defaultHomeY;
@ -64,7 +67,7 @@ namespace OpenSim.Region.Communications.Local
return profile;
}
Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account");
m_log.Debug("Unknown Master User. Sandbox Mode: Creating Account");
AddUser(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY);
return GetUserProfile(firstName, lastName);
}

View File

@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
byte[] data, bool storeLocal, bool tempFile)
{
//System.Console.WriteLine("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
//m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
if (((AssetType)type == AssetType.Texture ||
(AssetType)type == AssetType.Sound ||
(AssetType)type == AssetType.TextureTGA ||
@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
}
//Console.WriteLine("asset upload of " + assetID);
//m_log.Debug("asset upload of " + assetID);
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
/// <param name="data"></param>
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
{
//System.Console.WriteLine("xferID: " + xferID + " packetID: " + packetID + " data!");
//m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
transactions.HandleXfer(xferID, packetID, data);

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public AssetTransactionModule()
{
// System.Console.WriteLine("creating AgentAssetTransactionModule");
//m_log.Debug("creating AgentAssetTransactionModule");
}
#region IRegionModule Members
@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
{
// System.Console.WriteLine("initialising AgentAssetTransactionModule");
// m_log.Debug("initialising AgentAssetTransactionModule");
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
scene.RegisterModuleInterface<IAgentAssetTransactions>(this);
@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
byte[] data, bool storeLocal, bool tempFile)
{
//System.Console.WriteLine("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
//m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
if (((AssetType)type == AssetType.Texture ||
(AssetType)type == AssetType.Sound ||
(AssetType)type == AssetType.TextureTGA ||
@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
}
//Console.WriteLine("asset upload of " + assetID);
//m_log.Debug("asset upload of " + assetID);
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
/// <param name="data"></param>
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
{
//System.Console.WriteLine("xferID: " + xferID + " packetID: " + packetID + " data!");
//m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
transactions.HandleXfer(xferID, packetID, data);

View File

@ -188,21 +188,21 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
public void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds)
{
//Console.WriteLine(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count);
//m_log.Debug(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count);
childrenSeeds[agentID] = seeds;
}
public void DumpChildrenSeeds(UUID agentID)
{
Console.WriteLine("================ ChildrenSeed {0} ================", m_scene.RegionInfo.RegionName);
m_log.Info("================ ChildrenSeed "+m_scene.RegionInfo.RegionName+" ================");
foreach (KeyValuePair<ulong, string> kvp in childrenSeeds[agentID])
{
uint x, y;
Utils.LongToUInts(kvp.Key, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
Console.WriteLine(" >> {0}, {1}: {2}", x, y, kvp.Value);
m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
}
}
}
}
}

View File

@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
{
if (m_scene == null)
{
//Console.WriteLine("Creating Texture download module");
//m_log.Debug("Creating Texture download module");
m_scene = scene;
m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
m_thread.Name = "ProcessTextureSenderThread";

View File

@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
//Utils.LongToUInts(regionHandle, out x, out y);
//x = x / Constants.RegionSize;
//y = y / Constants.RegionSize;
//Console.WriteLine("\n >>> Local SendReleaseAgent " + x + "-" + y);
//m_log.Debug("\n >>> Local SendReleaseAgent " + x + "-" + y);
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == regionHandle)
@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
//Utils.LongToUInts(regionHandle, out x, out y);
//x = x / Constants.RegionSize;
//y = y / Constants.RegionSize;
//Console.WriteLine("\n >>> Local SendCloseAgent " + x + "-" + y);
//m_log.Debug("\n >>> Local SendCloseAgent " + x + "-" + y);
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == regionHandle)

View File

@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
// Eventually, we want to use a caps url instead of the agentID
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + aCircuit.AgentID + "/";
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
//m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
WebRequest AgentCreateRequest = WebRequest.Create(uri);
AgentCreateRequest.Method = "POST";
@ -358,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
// Eventually, we want to use a caps url instead of the agentID
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + cAgentData.AgentID + "/";
//Console.WriteLine(" >>> DoChildAgentUpdateCall <<< " + uri);
//m_log.Debug(" >>> DoChildAgentUpdateCall <<< " + uri);
WebRequest ChildUpdateRequest = WebRequest.Create(uri);
ChildUpdateRequest.Method = "PUT";
@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected bool DoReleaseAgentCall(ulong regionHandle, UUID id, string uri)
{
//Console.WriteLine(" >>> DoReleaseAgentCall <<< " + uri);
//m_log.Debug(" >>> DoReleaseAgentCall <<< " + uri);
WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE";
@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + id + "/" + region.RegionHandle.ToString() +"/";
//Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
//m_log.Debug(" >>> DoCloseAgentCall <<< " + uri);
WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE";
@ -508,7 +508,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
ulong regionHandle = GetRegionHandle(region.RegionHandle);
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + sog.UUID + "/" + regionHandle.ToString() + "/";
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
//m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
WebRequest ObjectCreateRequest = WebRequest.Create(uri);
ObjectCreateRequest.Method = "POST";
@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected bool DoHelloNeighbourCall(RegionInfo region, RegionInfo thisRegion)
{
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/";
//Console.WriteLine(" >>> DoHelloNeighbourCall <<< " + uri);
//m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
HelloNeighbourRequest.Method = "POST";
@ -681,11 +681,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
//m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called");
//Console.WriteLine("---------------------------");
//Console.WriteLine(" >> uri=" + request["uri"]);
//Console.WriteLine(" >> content-type=" + request["content-type"]);
//Console.WriteLine(" >> http-method=" + request["http-method"]);
//Console.WriteLine("---------------------------\n");
//m_log.Debug("---------------------------");
//m_log.Debug(" >> uri=" + request["uri"]);
//m_log.Debug(" >> content-type=" + request["content-type"]);
//m_log.Debug(" >> http-method=" + request["http-method"]);
//m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
@ -833,7 +833,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected virtual void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, ulong regionHandle)
{
//Console.WriteLine(" >>> DoDelete action:" + action + "; regionHandle:" + regionHandle);
//m_log.Debug(" >>> DoDelete action:" + action + "; regionHandle:" + regionHandle);
if (action.Equals("release"))
m_localBackend.SendReleaseAgent(regionHandle, id, "");
@ -852,11 +852,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
//m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
//Console.WriteLine("---------------------------");
//Console.WriteLine(" >> uri=" + request["uri"]);
//Console.WriteLine(" >> content-type=" + request["content-type"]);
//Console.WriteLine(" >> http-method=" + request["http-method"]);
//Console.WriteLine("---------------------------\n");
//m_log.Debug("---------------------------");
//m_log.Debug(" >> uri=" + request["uri"]);
//m_log.Debug(" >> content-type=" + request["content-type"]);
//m_log.Debug(" >> http-method=" + request["http-method"]);
//m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";
@ -964,11 +964,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{
//m_log.Debug("[CONNECTION DEBUGGING]: RegionHandler Called");
//Console.WriteLine("---------------------------");
//Console.WriteLine(" >> uri=" + request["uri"]);
//Console.WriteLine(" >> content-type=" + request["content-type"]);
//Console.WriteLine(" >> http-method=" + request["http-method"]);
//Console.WriteLine("---------------------------\n");
//m_log.Debug("---------------------------");
//m_log.Debug(" >> uri=" + request["uri"]);
//m_log.Debug(" >> content-type=" + request["content-type"]);
//m_log.Debug(" >> http-method=" + request["http-method"]);
//m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html";

View File

@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
//m_scene.ForEachScenePresence(delegate (ScenePresence sp) {
// if (!sp.IsChildAgent && sp.UUID == remoteClient.AgentId)
// {
// Console.WriteLine("XXX Root agent");
// m_log.Debug("XXX Root agent");
// DoRequestMapBlocks(remoteClient, minX, minY, maxX, maxY, flag);
// }
//};

View File

@ -375,7 +375,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
public OSD RequestRezAvatarMethod(string path, OSD request)
{
//System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
//m_log.Debug("[REQUESTREZAVATAR]: " + request.ToString());
OSDMap requestMap = (OSDMap)request;
@ -602,7 +602,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
}
}
//System.Console.WriteLine("Response:" + responseMap.ToString());
//m_log.Debug("Response:" + responseMap.ToString());
return responseMap;
}

View File

@ -35,6 +35,8 @@ using OpenMetaverse.Imaging;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using System.Reflection;
namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
{
@ -86,7 +88,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
{
if (RenderPlugins.ContainsKey(contentType))
{
//Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
//m_log.Debug("dynamic texture being created: " + url + " of type " + contentType);
DynamicTextureUpdater updater = new DynamicTextureUpdater();
updater.SimUUID = simID;
@ -192,6 +194,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
public class DynamicTextureUpdater
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public bool BlendWithOldTexture = false;
public string BodyData;
public string ContentType;
@ -302,8 +306,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
}
catch (Exception)
{
Console.WriteLine(
"[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
m_log.Error("[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
}
return result;

View File

@ -34,11 +34,15 @@ using OpenMetaverse;
using OpenMetaverse.Imaging;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using System.Reflection;
namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
{
public class LoadImageURLModule : IRegionModule, IDynamicTextureRender
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_name = "LoadImageURL";
private Scene m_scene;
private IDynamicTextureManager m_textureManager;
@ -203,8 +207,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
}
catch (Exception)
{
Console.WriteLine(
"[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
}
m_textureManager.ReturnData(state.RequestID, imageJ2000);

View File

@ -36,6 +36,8 @@ using OpenMetaverse;
using OpenMetaverse.Imaging;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using System.Reflection;
//using Cairo;
@ -43,6 +45,8 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
{
public class VectorRenderModule : IRegionModule, IDynamicTextureRender
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_name = "VectorRenderModule";
private Scene m_scene;
private IDynamicTextureManager m_textureManager;
@ -317,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
}
catch (Exception)
{
Console.WriteLine(
m_log.Error(
"[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
}
m_textureManager.ReturnData(id, imageJ2000);
@ -333,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
catch (Exception)
{
//Ckrinke: Add a WriteLine to remove the warning about 'e' defined but not used
// Console.WriteLine("Problem with Draw. Please verify parameters." + e.ToString());
// m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString());
parsed = -1;
}

View File

@ -333,7 +333,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
}
else
{
Console.WriteLine("UNABLE TO REMOVE COMPLETED REQUEST");
m_log.Error("UNABLE TO REMOVE COMPLETED REQUEST");
}
}
}

View File

@ -28,11 +28,15 @@ using System;
using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using log4net;
using System.Reflection;
namespace OpenSim.Region.CoreModules.World.Terrain.Effects
{
internal class CookieCutter : ITerrainEffect
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
#region ITerrainEffect Members
public void RunEffect(ITerrainChannel map)
@ -44,7 +48,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
bool[,] smoothMask = new bool[map.Width,map.Height];
bool[,] allowMask = new bool[map.Width,map.Height];
Console.WriteLine("S1");
m_log.Info("S1");
// Step one, generate rough mask
int x, y;
@ -52,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
{
for (y = 0; y < map.Height; y++)
{
Console.Write(".");
m_log.Info(".");
smoothMask[x, y] = true;
allowMask[x,y] = true;
@ -71,10 +75,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
}
}
Console.WriteLine("S2");
m_log.Info("S2");
//smooth.FloodEffect(map, smoothMask, 4.0);
Console.WriteLine("S3");
m_log.Info("S3");
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)

View File

@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
}
catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke
{
Console.WriteLine("Failed generating terrain map: " + e);
m_log.Error("Failed generating terrain map: " + e);
}
return imageData;

View File

@ -40,6 +40,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{
// Hue, Saturation, Value; used for color-interpolation
struct HSV {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public float h;
public float s;
public float v;
@ -76,10 +78,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV)
public Color toColor()
{
if (s < 0f) Console.WriteLine("S < 0: " + s);
else if (s > 1f) Console.WriteLine("S > 1: " + s);
if (v < 0f) Console.WriteLine("V < 0: " + v);
else if (v > 1f) Console.WriteLine("V > 1: " + v);
if (s < 0f) m_log.Debug("S < 0: " + s);
else if (s > 1f) m_log.Debug("S > 1: " + s);
if (v < 0f) m_log.Debug("V < 0: " + v);
else if (v > 1f) m_log.Debug("V > 1: " + v);
float f = h / 60f;
int sector = (int)f % 6;

View File

@ -31,6 +31,8 @@ using System.Collections.Generic;
using OpenSim.Framework;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Framework.Scenes
{
@ -240,6 +242,7 @@ namespace OpenSim.Region.Framework.Scenes
public class AgentData : IAgentData
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private UUID m_id;
public UUID AgentID
{
@ -496,10 +499,10 @@ namespace OpenSim.Region.Framework.Scenes
public void Dump()
{
System.Console.WriteLine("------------ AgentData ------------");
System.Console.WriteLine("UUID: " + AgentID);
System.Console.WriteLine("Region: " + RegionHandle);
System.Console.WriteLine("Position: " + Position);
m_log.Info("------------ AgentData ------------");
m_log.Info("UUID: " + AgentID);
m_log.Info("Region: " + RegionHandle);
m_log.Info("Position: " + Position);
}
}

View File

@ -150,7 +150,7 @@ namespace OpenSim.Region.Framework.Scenes
protected EntityBase(SerializationInfo info, StreamingContext context)
{
//System.Console.WriteLine("EntityBase Deserialize BGN");
//m_log.Debug("EntityBase Deserialize BGN");
if (info == null)
{
@ -187,7 +187,7 @@ namespace OpenSim.Region.Framework.Scenes
m_localId = (uint)info.GetValue("m_localId", typeof(uint));
//System.Console.WriteLine("EntityBase Deserialize END");
//m_log.Debug("EntityBase Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,

View File

@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
{
isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile);
realHandle = m_hg.FindRegionHandle(regionHandle);
Console.WriteLine("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
m_log.Debug("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
}
///
/// Hypergrid mod stop

View File

@ -358,7 +358,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (ownerID == CommsManager.UserProfileCacheService.LibraryRoot.Owner)
{
//Console.WriteLine("request info for library item");
//m_log.Debug("request info for library item");
return;
}

View File

@ -1538,7 +1538,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </returns>
public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp, bool silent)
{
//Console.WriteLine(" >>> CrossPrimGroupIntoNewRegion <<<");
//m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
bool successYN = false;
grp.RootPart.UpdateFlag = 0;
@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool IncomingCreateObject(ISceneObject sog)
{
//Console.WriteLine(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
//m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
SceneObjectGroup newObject;
try
{
@ -2482,7 +2482,7 @@ namespace OpenSim.Region.Framework.Scenes
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
{
//Console.WriteLine(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
//m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null)
{
@ -2924,7 +2924,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="cmdparams"></param>
public void HandleEditCommand(string[] cmdparams)
{
Console.WriteLine("Searching for Primitive: '" + cmdparams[2] + "'");
m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'");
List<EntityBase> EntityList = GetEntities();
@ -2941,7 +2941,7 @@ namespace OpenSim.Region.Framework.Scenes
new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]),
Convert.ToSingle(cmdparams[5])));
Console.WriteLine("Edited scale of Primitive: " + part.Name);
m_log.Debug("Edited scale of Primitive: " + part.Name);
}
}
}
@ -3414,7 +3414,7 @@ namespace OpenSim.Region.Framework.Scenes
public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
{
//Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
//m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
}

View File

@ -372,7 +372,7 @@ namespace OpenSim.Region.Framework.Scenes
Dictionary<ulong, string> seeds
= new Dictionary<ulong, string>(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID));
//Console.WriteLine(" !!! No. of seeds: " + seeds.Count);
//m_log.Debug(" !!! No. of seeds: " + seeds.Count);
if (!seeds.ContainsKey(avatar.Scene.RegionInfo.RegionHandle))
seeds.Add(avatar.Scene.RegionInfo.RegionHandle, avatar.ControllingClient.RequestClientInfo().CapsPath);
@ -954,7 +954,7 @@ namespace OpenSim.Region.Framework.Scenes
int count = 20;
while (m_agentsInTransit.Contains(id) && count-- > 0)
{
//Console.WriteLine(" >>> Waiting... " + count);
//m_log.Debug(" >>> Waiting... " + count);
Thread.Sleep(1000);
}
@ -966,7 +966,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool ReleaseAgent(UUID id)
{
//Console.WriteLine(" >>> ReleaseAgent called <<< ");
//m_log.Debug(" >>> ReleaseAgent called <<< ");
return ResetFromTransit(id);
}
@ -1104,7 +1104,7 @@ namespace OpenSim.Region.Framework.Scenes
//AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
agent.ControllingClient.RequestClientInfo();
//Console.WriteLine("BEFORE CROSS");
//m_log.Debug("BEFORE CROSS");
//Scene.DumpChildrenSeeds(UUID);
//DumpKnownRegions();
string agentcaps;
@ -1162,7 +1162,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
//Console.WriteLine("AFTER CROSS");
//m_log.Debug("AFTER CROSS");
//Scene.DumpChildrenSeeds(UUID);
//DumpKnownRegions();
return agent;
@ -1252,14 +1252,14 @@ namespace OpenSim.Region.Framework.Scenes
// private void Dump(string msg, List<ulong> handles)
// {
// Console.WriteLine("-------------- HANDLE DUMP ({0}) ---------", msg);
// m_log.Info"-------------- HANDLE DUMP ({0}) ---------", msg);
// foreach (ulong handle in handles)
// {
// uint x, y;
// Utils.LongToUInts(handle, out x, out y);
// x = x / Constants.RegionSize;
// y = y / Constants.RegionSize;
// Console.WriteLine("({0}, {1})", x, y);
// m_log.Info("({0}, {1})", x, y);
// }
// }
}

View File

@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool TrySetCurrentScene(UUID regionID)
{
Console.WriteLine("Searching for Region: '{0}'", regionID.ToString());
m_log.Debug("Searching for Region: '" + regionID + "'");
foreach (Scene scene in m_localScenes)
{

View File

@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes
public string GetStateSnapshot()
{
//Console.WriteLine(" >>> GetStateSnapshot <<<");
//m_log.Debug(" >>> GetStateSnapshot <<<");
List<string> assemblies = new List<string>();
Dictionary<UUID, string> states = new Dictionary<UUID, string>();

View File

@ -526,7 +526,7 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
Console.WriteLine("found unexpected element: " + reader.Name);
m_log.Warn("found unexpected element: " + reader.Name);
reader.Read();
}
break;

View File

@ -320,7 +320,7 @@ namespace OpenSim.Region.Framework.Scenes
protected SceneObjectPart(SerializationInfo info, StreamingContext context)
{
//System.Console.WriteLine("SceneObjectPart Deserialize BGN");
//m_log.Debug("SceneObjectPart Deserialize BGN");
m_TextureAnimation = new byte[0];
m_particleSystem = new byte[0];
if (info == null)
@ -333,7 +333,7 @@ namespace OpenSim.Region.Framework.Scenes
m_ids = (List<UUID>)info.GetValue("m_ids", typeof(List<UUID>));
*/
//System.Console.WriteLine("SceneObjectPart Deserialize END");
//m_log.Debug("SceneObjectPart Deserialize END");
Rezzed = DateTime.Now;
m_inventory = new SceneObjectPartInventory(this);
@ -534,7 +534,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
Console.WriteLine("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
}
}
@ -619,7 +619,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception ex)
{
Console.WriteLine("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
}
}
@ -1121,13 +1121,13 @@ if (m_shape != null) {
// PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) == 0)
{
//Console.WriteLine("Adding flag: " + ((PrimFlags) flag).ToString());
//m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
_flags |= flag;
if (flag == PrimFlags.TemporaryOnRez)
ResetExpire();
}
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
// m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
}
/// <summary>
@ -2197,10 +2197,10 @@ if (m_shape != null) {
// PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) != 0)
{
//Console.WriteLine("Removing flag: " + ((PrimFlags)flag).ToString());
//m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString());
_flags &= ~flag;
}
//System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//ScheduleFullUpdate();
}
@ -3552,7 +3552,7 @@ if (m_shape != null) {
{
RemFlag(PrimFlags.TemporaryOnRez);
}
// System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
// m_log.Debug("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();

View File

@ -666,7 +666,7 @@ namespace OpenSim.Region.Framework.Scenes
fileData = Utils.StringToBytes(invString.BuildString);
//Console.WriteLine(Utils.BytesToString(fileData));
//m_log.Debug(Utils.BytesToString(fileData));
//m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Utils.BytesToString(fileData));
if (fileData.Length > 2)

View File

@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes
{
// ~ScenePresence()
// {
// System.Console.WriteLine("[ScenePresence] Destructor called");
// m_log.Debug("[ScenePresence] Destructor called");
// }
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -409,7 +409,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
Console.WriteLine("[SCENEPRESENCE]: ABSOLUTE POSITION " + e.Message);
m_log.Error("[SCENEPRESENCE]: ABSOLUTE POSITION " + e.Message);
}
}
@ -449,7 +449,7 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (Exception e)
{
Console.WriteLine("[SCENEPRESENCE]: VELOCITY " + e.Message);
m_log.Error("[SCENEPRESENCE]: VELOCITY " + e.Message);
}
}
@ -525,20 +525,20 @@ namespace OpenSim.Region.Framework.Scenes
DropOldNeighbours(old);
Scene.CapsModule.SetChildrenSeed(UUID, seeds);
KnownRegions = seeds;
//Console.WriteLine(" ++++++++++AFTER+++++++++++++ ");
//m_log.Debug(" ++++++++++AFTER+++++++++++++ ");
//DumpKnownRegions();
}
public void DumpKnownRegions()
{
Console.WriteLine("================ KnownRegions {0} ================", Scene.RegionInfo.RegionName);
m_log.Info("================ KnownRegions "+Scene.RegionInfo.RegionName+" ================");
foreach (KeyValuePair<ulong, string> kvp in KnownRegions)
{
uint x, y;
Utils.LongToUInts(kvp.Key, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
Console.WriteLine(" >> {0}, {1}: {2}", x, y, kvp.Value);
m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
}
}
@ -991,7 +991,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_knownChildRegions.ContainsKey(regionHandle))
{
m_knownChildRegions.Remove(regionHandle);
//Console.WriteLine(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
//m_log.Debug(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
}
}
}
@ -1066,7 +1066,7 @@ namespace OpenSim.Region.Framework.Scenes
{
//if (m_isChildAgent)
//{
// // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent");
// // m_log.Debug("DEBUG: HandleAgentUpdate: child agent");
// return;
//}
@ -1406,7 +1406,7 @@ namespace OpenSim.Region.Framework.Scenes
catch (Exception ex)
{
//Why did I get this error?
Console.WriteLine("[SCENEPRESENCE]: DoMoveToPosition" + ex.ToString());
m_log.Error("[SCENEPRESENCE]: DoMoveToPosition" + ex.ToString());
}
}
@ -1923,7 +1923,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (m_isChildAgent)
{
Console.WriteLine("DEBUG: AddNewMovement: child agent");
m_log.Debug("DEBUG: AddNewMovement: child agent");
return;
}
@ -2507,8 +2507,8 @@ namespace OpenSim.Region.Framework.Scenes
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
//Console.WriteLine("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
//Console.WriteLine("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
//m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
//m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
if (Util.IsOutsideView(x, newRegionX, y, newRegionY))
{
byebyeRegions.Add(handle);
@ -2561,7 +2561,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ChildAgentDataUpdate(AgentData cAgentData)
{
//Console.WriteLine(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
//m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
if (!IsChildAgent)
return;
@ -2577,7 +2577,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!IsChildAgent)
return;
//Console.WriteLine(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY);
//m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY);
int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize;
int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize;
@ -2816,7 +2816,7 @@ namespace OpenSim.Region.Framework.Scenes
protected ScenePartUpdate(SerializationInfo info, StreamingContext context)
{
//System.Console.WriteLine("ScenePartUpdate Deserialize BGN");
//m_log.Debug("ScenePartUpdate Deserialize BGN");
if (info == null)
{
@ -2827,7 +2827,7 @@ namespace OpenSim.Region.Framework.Scenes
LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint));
LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint));
//System.Console.WriteLine("ScenePartUpdate Deserialize END");
//m_log.Debug("ScenePartUpdate Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,
@ -3084,7 +3084,7 @@ namespace OpenSim.Region.Framework.Scenes
protected ScenePresence(SerializationInfo info, StreamingContext context)
: base (info, context)
{
//System.Console.WriteLine("ScenePresence Deserialize BGN");
//m_log.Debug("ScenePresence Deserialize BGN");
if (info == null)
{
@ -3239,7 +3239,7 @@ namespace OpenSim.Region.Framework.Scenes
m_state = (byte)info.GetValue("m_state", typeof(byte));
//System.Console.WriteLine("ScenePresence Deserialize END");
//m_log.Debug("ScenePresence Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,

View File

@ -27,11 +27,15 @@
using System;
using OpenMetaverse;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Framework.Scenes.Scripting
{
public class NullScriptHost : IScriptHost
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Vector3 m_pos = new Vector3(128, 128, 30);
public string Name
@ -80,7 +84,7 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
public void SetText(string text, Vector3 color, double alpha)
{
Console.WriteLine("Tried to SetText [{0}] on NullScriptHost", text);
m_log.Warn("Tried to SetText "+text+" on NullScriptHost");
}
}
}

View File

@ -87,10 +87,10 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
//}
//Console.WriteLine("Loading: " + FileName);
//m_log.Debug("Loading: " + FileName);
//foreach (Type _t in a.GetTypes())
//{
// Console.WriteLine("Type: " + _t.ToString());
// m_log.Debug("Type: " + _t.ToString());
//}
Type t;

View File

@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();
// Know what's not thread safe in Mono... modifying timers.
// System.Console.WriteLine("Firing Stats Heart Beat");
// m_log.Debug("Firing Stats Heart Beat");
lock (m_report)
{
uint regionFlags = 0;

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
//System.Console.WriteLine("retrievedPart : {0}", retrievedPart);
//m_log.Debug("retrievedPart : {0}", retrievedPart);
// If the parts have the same UUID then we will consider them as one and the same
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
}
@ -136,4 +136,4 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
Assert.That(retrievedPart, Is.Null);
}
}
}
}

View File

@ -36,6 +36,8 @@ using OpenSim.Region.Communications.Local;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common.Mock;
using OpenSim.Tests.Common.Setup;
using log4net;
using System.Reflection;
namespace OpenSim.Region.CoreModules.Scenes.Tests
{
@ -45,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
[TestFixture]
public class SceneObjectLinkingTests
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
[Test]
public void TestLinkDelink2SceneObjects()
{
@ -80,10 +84,10 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
if (debugtest)
{
System.Console.WriteLine("parts: {0}", grp1.Children.Count);
System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
System.Console.WriteLine("Group1: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.OffsetPosition, part2.RotationOffset);
m_log.Debug("parts: " + grp1.Children.Count);
m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation);
m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset);
m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset);
}
// root part should have no offset position or rotation
@ -101,13 +105,13 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
System.Console.WriteLine(rotEuler1);
m_log.Debug(rotEuler1);
part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
System.Console.WriteLine(rotEuler2);
m_log.Debug(rotEuler2);
Assert.That(rotEuler2.ApproxEquals(new Vector3(-180, 0, 0), 0.001f) || rotEuler2.ApproxEquals(new Vector3(180, 0, 0), 0.001f));
@ -115,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
grp1.DelinkFromGroup(part2.LocalId);
if (debugtest)
System.Console.WriteLine("Group2: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.AbsolutePosition, part2.RotationOffset);
m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset);
Assert.That(grp1.Children.Count, Is.EqualTo(1), "Group 1 still contained part2 after delink.");
Assert.That(part2.AbsolutePosition == Vector3.Zero);
@ -175,16 +179,16 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
if (debugtest)
{
System.Console.WriteLine("--------After Link-------");
System.Console.WriteLine("Group1: parts: {0}", grp1.Children.Count);
System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
System.Console.WriteLine("Group1: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.OffsetPosition, part2.RotationOffset);
m_log.Debug("--------After Link-------");
m_log.Debug("Group1: parts:" + grp1.Children.Count);
m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation);
m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset);
m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset);
System.Console.WriteLine("Group3: parts: {0}", grp3.Children.Count);
System.Console.WriteLine("Group3: Pos:{0}, Rot:{1}", grp3.AbsolutePosition, grp3.Rotation);
System.Console.WriteLine("Group3: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part3.OffsetPosition, part3.RotationOffset);
System.Console.WriteLine("Group3: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part4.OffsetPosition, part4.RotationOffset);
m_log.Debug("Group3: parts:"+grp3.Children.Count);
m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation);
m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset);
m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset);
}
// Required for linking
@ -206,13 +210,13 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
System.Console.WriteLine(rotEuler1);
m_log.Debug(rotEuler1);
part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
if (debugtest)
System.Console.WriteLine(rotEuler2);
m_log.Debug(rotEuler2);
Assert.That(rotEuler2.ApproxEquals(new Vector3(-180, 0, 0), 0.001f) || rotEuler2.ApproxEquals(new Vector3(180, 0, 0), 0.001f));
@ -225,16 +229,16 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
if (debugtest)
{
System.Console.WriteLine("--------After De-Link-------");
System.Console.WriteLine("Group1: parts: {0}", grp1.Children.Count);
System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
System.Console.WriteLine("NoGroup: Prim2: AbsolutePosition:{0}, OffsetRotation:{1}", part2.AbsolutePosition, part2.RotationOffset);
m_log.Debug("--------After De-Link-------");
m_log.Debug("Group1: parts:" + grp1.Children.Count);
m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.Rotation);
m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset);
m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset);
System.Console.WriteLine("Group3: parts: {0}", grp3.Children.Count);
System.Console.WriteLine("Group3: Pos:{0}, Rot:{1}", grp3.AbsolutePosition, grp3.Rotation);
System.Console.WriteLine("Group3: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part3.OffsetPosition, part3.RotationOffset);
System.Console.WriteLine("Group3: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part4.OffsetPosition, part4.RotationOffset);
m_log.Debug("Group3: parts:" + grp3.Children.Count);
m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.Rotation);
m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset);
m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset);
}
Assert.That(part2.AbsolutePosition == Vector3.Zero);

View File

@ -53,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
m_leftY = leftY;
m_width = width;
m_height = height;
// Console.WriteLine("creating quadtree node " + m_quadID);
// m_log.Debug("creating quadtree node " + m_quadID);
}
public void AddObject(SceneObjectGroup obj)

View File

@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
protected UpdateQueue(SerializationInfo info, StreamingContext context)
{
//System.Console.WriteLine("UpdateQueue Deserialize BGN");
//m_log.Debug("UpdateQueue Deserialize BGN");
if (info == null)
{
@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
m_ids.Add(new UUID(guid));
}
//System.Console.WriteLine("UpdateQueue Deserialize END");
//m_log.Debug("UpdateQueue Deserialize END");
}
[SecurityPermission(SecurityAction.LinkDemand,

View File

@ -35,6 +35,8 @@ using OpenMetaverse.Imaging;
using System.Drawing;
using System.Drawing.Imaging;
using PrimMesher;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Physics.Meshing
{
@ -57,6 +59,7 @@ namespace OpenSim.Region.Physics.Meshing
public class Meshmerizer : IMesher
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Setting baseDir to a path will enable the dumping of raw files
@ -155,9 +158,9 @@ namespace OpenSim.Region.Physics.Meshing
private void ReportPrimError(string message, string primName, PrimMesh primMesh)
{
Console.WriteLine(message);
Console.WriteLine("\nPrim Name: " + primName);
Console.WriteLine("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString());
m_log.Error(message);
m_log.Error("\nPrim Name: " + primName);
m_log.Error("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString());
}
@ -185,17 +188,17 @@ namespace OpenSim.Region.Physics.Meshing
}
catch (DllNotFoundException)
{
System.Console.WriteLine("[PHYSICS]: OpenJpeg is not installed correctly on this system. Physics Proxy generation failed. Often times this is because of an old version of GLIBC. You must have version 2.4 or above!");
m_log.Error("[PHYSICS]: OpenJpeg is not installed correctly on this system. Physics Proxy generation failed. Often times this is because of an old version of GLIBC. You must have version 2.4 or above!");
return null;
}
catch (IndexOutOfRangeException)
{
System.Console.WriteLine("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed");
m_log.Error("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed");
return null;
}
catch (Exception)
{
System.Console.WriteLine("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
m_log.Error("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
return null;
}
@ -285,7 +288,7 @@ namespace OpenSim.Region.Physics.Meshing
if (profileEnd > 1.0f) profileEnd = 1.0f;
}
#if SPAM
Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
m_log.Debug("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
#endif
try
{
@ -316,7 +319,7 @@ namespace OpenSim.Region.Physics.Meshing
if (profileEnd > 1.0f) profileEnd = 1.0f;
}
#if SPAM
Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
m_log.Debug("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
#endif
try
{
@ -378,7 +381,7 @@ namespace OpenSim.Region.Physics.Meshing
if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
{
#if SPAM
Console.WriteLine("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
minSizeForComplexMesh.ToString() + " - creating simple bounding box" );
#endif

View File

@ -29,6 +29,8 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using log4net;
using System.Reflection;
namespace PrimMesher
{
@ -576,6 +578,7 @@ namespace PrimMesher
/// </summary>
internal class Profile
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private const float twoPi = 2.0f * (float)Math.PI;
internal List<Coord> coords;
@ -643,8 +646,8 @@ namespace PrimMesher
try { angles.makeAngles(sides, startAngle, stopAngle); }
catch (Exception ex)
{
Console.WriteLine("makeAngles failed: Exception: " + ex.ToString());
Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
m_log.Error("makeAngles failed: Exception: " + ex.ToString());
m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
return;
}
@ -663,8 +666,8 @@ namespace PrimMesher
try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); }
catch (Exception ex)
{
Console.WriteLine("makeAngles failed: Exception: " + ex.ToString());
Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
m_log.Error("makeAngles failed: Exception: " + ex.ToString());
m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
return;
}
}

View File

@ -669,7 +669,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_pidControllerActive = false;
force *= 100f;
doForce(force);
//System.Console.WriteLine("Push!");
//m_log.Debug("Push!");
//_target_velocity.X += force.X;
// _target_velocity.Y += force.Y;
//_target_velocity.Z += force.Z;

View File

@ -2507,7 +2507,7 @@ namespace OpenSim.Region.Physics.OdePlugin
}
else
{
//System.Console.WriteLine(Math.Abs(m_lastposition.X - l_position.X).ToString());
//m_log.Debug(Math.Abs(m_lastposition.X - l_position.X).ToString());
_zeroFlag = false;
}
@ -2569,7 +2569,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_rotationalVelocity.setValues(rotvel.X, rotvel.Y, rotvel.Z);
}
//System.Console.WriteLine("ODE: " + m_rotationalVelocity.ToString());
//m_log.Debug("ODE: " + m_rotationalVelocity.ToString());
_orientation.X = ori.X;
_orientation.Y = ori.Y;
_orientation.Z = ori.Z;

View File

@ -31,12 +31,16 @@ using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Physics.Manager;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Physics.OdePlugin
{
[TestFixture]
public class ODETestClass
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private OdePlugin cbt;
private PhysicsScene ps;
private IMeshingPlugin imp;
@ -92,18 +96,18 @@ namespace OpenSim.Region.Physics.OdePlugin
Assert.That(oprim.m_targetSpace != (IntPtr)0);
//Assert.That(oprim.m_targetSpace == pscene.space);
Console.WriteLine("TargetSpace: " + oprim.m_targetSpace + " - SceneMainSpace: " + pscene.space);
m_log.Info("TargetSpace: " + oprim.m_targetSpace + " - SceneMainSpace: " + pscene.space);
Assert.That(!oprim.m_taintadd);
Console.WriteLine("Prim Position (" + oprim.m_localID + "): " + prim.Position.ToString());
m_log.Info("Prim Position (" + oprim.m_localID + "): " + prim.Position.ToString());
// Make sure we're above the ground
//Assert.That(prim.Position.Z > 20f);
//Console.WriteLine("PrimCollisionScore (" + oprim.m_localID + "): " + oprim.m_collisionscore);
//m_log.Info("PrimCollisionScore (" + oprim.m_localID + "): " + oprim.m_collisionscore);
// Make sure we've got a Body
Assert.That(oprim.Body != (IntPtr)0);
//Console.WriteLine(
//m_log.Info(
}
// Make sure we're not somewhere above the ground

Some files were not shown because too many files have changed in this diff Show More