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) catch (Exception e)
{ {
//Are we not in a loop here //Are we not in a loop here
//m_log.Error(e.ToString()); m_log.Error("[LOG DB] Error logging : " + e.Message);
Console.WriteLine("[LOG DB] Error logging : " + e.Message);
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -122,7 +122,7 @@ namespace OpenSim.Framework
AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID; AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
AgentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID; 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.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height
+ 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length + 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length
- m_avatarHeight / 2) * 0.3f - 0.04f; - m_avatarHeight / 2) * 0.3f - 0.04f;
//System.Console.WriteLine(">>>>>>> [APPEARANCE]: Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset); //m_log.Debug(">>>>>>> [APPEARANCE]: Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset);
//System.Console.WriteLine("------------- Set Appearance Texture ---------------"); //m_log.Debug("------------- Set Appearance Texture ---------------");
//Primitive.TextureEntryFace[] faces = Texture.FaceTextures; //Primitive.TextureEntryFace[] faces = Texture.FaceTextures;
//foreach (Primitive.TextureEntryFace face in faces) //foreach (Primitive.TextureEntryFace face in faces)
//{ //{
// if (face != null) // if (face != null)
// System.Console.WriteLine(" ++ " + face.TextureID); // m_log.Debug(" ++ " + face.TextureID);
// else // 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)); 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 // this is used for OGS1

View File

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

View File

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

View File

@ -510,11 +510,11 @@ namespace OpenSim.Framework.Communications.Cache
//inventory asset request //inventory asset request
requestID = new UUID(transferRequest.TransferInfo.Params, 80); requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = 3; 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. //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)) if (!m_memcache.Contains(requestID))
{ {
//not found asset //not found asset

View File

@ -464,7 +464,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <returns></returns> /// <returns></returns>
public string RequestTexture(string request, string path, string param) 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) // Needs implementing (added to remove compiler warning)
return String.Empty; 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 assetName = llsdRequest.name;
string assetDes = llsdRequest.description; string assetDes = llsdRequest.description;

View File

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

View File

@ -58,7 +58,7 @@ namespace OpenSim.Framework
{ {
string userServerURI = ServerURI(userserver); string userServerURI = ServerURI(userserver);
bool ret = (((userServerURI == null) || (userServerURI == "") || (userServerURI == LocalUserServerURI))); 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; return ret;
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -627,7 +627,7 @@ namespace OpenSim.Grid.GridServer
else if (requestData.ContainsKey("region_handle")) else if (requestData.ContainsKey("region_handle"))
{ {
//CFK: The if/else below this makes this message redundant. //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"]); ulong regionHandle = Convert.ToUInt64((string)requestData["region_handle"]);
simData = m_gridDBService.GetRegion(regionHandle); simData = m_gridDBService.GetRegion(regionHandle);
if (simData == null) if (simData == null)

View File

@ -402,7 +402,7 @@ namespace OpenSim.Grid.UserServer
Hashtable requestData = (Hashtable) request.Params[0]; Hashtable requestData = (Hashtable) request.Params[0];
UserProfileData userProfile; UserProfileData userProfile;
//CFK: this clogs the UserServer log and is not necessary at this time. //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")) if (requestData.Contains("avatar_uuid"))
{ {
try try
@ -435,7 +435,7 @@ namespace OpenSim.Grid.UserServer
Hashtable requestData = (Hashtable) request.Params[0]; Hashtable requestData = (Hashtable) request.Params[0];
UserProfileData userProfile; UserProfileData userProfile;
//CFK: this clogs the UserServer log and is not necessary at this time. //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")) if (requestData.Contains("avatar_uuid"))
{ {
UUID guess; UUID guess;

View File

@ -55,15 +55,15 @@ namespace OpenSim
XmlConfigurator.Configure(); XmlConfigurator.Configure();
Console.Write("Performing compatibility checks... "); m_log.Info("Performing compatibility checks... ");
string supported = String.Empty; string supported = String.Empty;
if (Util.IsEnvironmentSupported(ref supported)) if (Util.IsEnvironmentSupported(ref supported))
{ {
Console.WriteLine(" Environment is compatible.\n"); m_log.Info("Environment is compatible.\n");
} }
else else
{ {
Console.WriteLine(" Environment is unsupported (" + supported + ")\n"); m_log.Warn("Environment is unsupported (" + supported + ")\n");
} }
Culture.SetCurrentCulture(); Culture.SetCurrentCulture();
@ -115,7 +115,7 @@ namespace OpenSim
} }
catch (Exception e) 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") if (m_configSettings.StorageDll == "OpenSim.DataStore.MonoSqlite.dll")
{ {
m_configSettings.StorageDll = "OpenSim.Data.SQLite.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); Thread.Sleep(3000);
} }

View File

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

View File

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

View File

@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{ {
numBytes = 0; numBytes = 0;
//System.Console.WriteLine("Queue size " + m_chunksToLoad.Count); //m_log.Debug("Queue size " + m_chunksToLoad.Count);
if (m_chunksToLoad.Count <= 0) if (m_chunksToLoad.Count <= 0)
return false; return false;

View File

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

View File

@ -84,10 +84,10 @@ namespace OpenSim.Region.Communications.Local
/// <returns></returns> /// <returns></returns>
public RegionCommsListener RegisterRegion(RegionInfo regionInfo) 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)) 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); m_regions.Add(regionInfo.RegionHandle, regionInfo);
RegionCommsListener regionHost = new RegionCommsListener(); RegionCommsListener regionHost = new RegionCommsListener();
@ -145,15 +145,15 @@ namespace OpenSim.Region.Communications.Local
/// <returns></returns> /// <returns></returns>
public List<SimpleRegionInfo> RequestNeighbours(uint x, uint y) 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>(); List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
foreach (RegionInfo reg in m_regions.Values) 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) 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.RegionLocX > (x - 2)) && (reg.RegionLocX < (x + 2)))
{ {
if ((reg.RegionLocY > (y - 2)) && (reg.RegionLocY < (y + 2))) if ((reg.RegionLocY > (y - 2)) && (reg.RegionLocY < (y + 2)))

View File

@ -29,11 +29,14 @@ using System;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local
{ {
public class LocalUserServices : UserManagerBase public class LocalUserServices : UserManagerBase
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly uint m_defaultHomeX; private readonly uint m_defaultHomeX;
private readonly uint m_defaultHomeY; private readonly uint m_defaultHomeY;
@ -64,7 +67,7 @@ namespace OpenSim.Region.Communications.Local
return profile; 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); AddUser(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY);
return GetUserProfile(firstName, lastName); 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, public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
byte[] data, bool storeLocal, bool tempFile) 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 || if (((AssetType)type == AssetType.Texture ||
(AssetType)type == AssetType.Sound || (AssetType)type == AssetType.Sound ||
(AssetType)type == AssetType.TextureTGA || (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); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
AssetXferUploader uploader = transactions.RequestXferUploader(transaction); AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
/// <param name="data"></param> /// <param name="data"></param>
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) 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); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
transactions.HandleXfer(xferID, packetID, data); transactions.HandleXfer(xferID, packetID, data);

View File

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

View File

@ -188,20 +188,20 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
public void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds) 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; childrenSeeds[agentID] = seeds;
} }
public void DumpChildrenSeeds(UUID agentID) 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]) foreach (KeyValuePair<ulong, string> kvp in childrenSeeds[agentID])
{ {
uint x, y; uint x, y;
Utils.LongToUInts(kvp.Key, out x, out y); Utils.LongToUInts(kvp.Key, out x, out y);
x = x / Constants.RegionSize; x = x / Constants.RegionSize;
y = y / 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) if (m_scene == null)
{ {
//Console.WriteLine("Creating Texture download module"); //m_log.Debug("Creating Texture download module");
m_scene = scene; m_scene = scene;
m_thread = new Thread(new ThreadStart(ProcessTextureSenders)); m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
m_thread.Name = "ProcessTextureSenderThread"; m_thread.Name = "ProcessTextureSenderThread";

View File

@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
//Utils.LongToUInts(regionHandle, out x, out y); //Utils.LongToUInts(regionHandle, out x, out y);
//x = x / Constants.RegionSize; //x = x / Constants.RegionSize;
//y = y / 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) foreach (Scene s in m_sceneList)
{ {
if (s.RegionInfo.RegionHandle == regionHandle) if (s.RegionInfo.RegionHandle == regionHandle)
@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
//Utils.LongToUInts(regionHandle, out x, out y); //Utils.LongToUInts(regionHandle, out x, out y);
//x = x / Constants.RegionSize; //x = x / Constants.RegionSize;
//y = y / 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) foreach (Scene s in m_sceneList)
{ {
if (s.RegionInfo.RegionHandle == regionHandle) 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 // Eventually, we want to use a caps url instead of the agentID
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + aCircuit.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); WebRequest AgentCreateRequest = WebRequest.Create(uri);
AgentCreateRequest.Method = "POST"; 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 // Eventually, we want to use a caps url instead of the agentID
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + cAgentData.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); WebRequest ChildUpdateRequest = WebRequest.Create(uri);
ChildUpdateRequest.Method = "PUT"; ChildUpdateRequest.Method = "PUT";
@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected bool DoReleaseAgentCall(ulong regionHandle, UUID id, string uri) protected bool DoReleaseAgentCall(ulong regionHandle, UUID id, string uri)
{ {
//Console.WriteLine(" >>> DoReleaseAgentCall <<< " + uri); //m_log.Debug(" >>> DoReleaseAgentCall <<< " + uri);
WebRequest request = WebRequest.Create(uri); WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE"; 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() +"/"; 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); WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE"; request.Method = "DELETE";
@ -508,7 +508,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{ {
ulong regionHandle = GetRegionHandle(region.RegionHandle); ulong regionHandle = GetRegionHandle(region.RegionHandle);
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + sog.UUID + "/" + regionHandle.ToString() + "/"; 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); WebRequest ObjectCreateRequest = WebRequest.Create(uri);
ObjectCreateRequest.Method = "POST"; ObjectCreateRequest.Method = "POST";
@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
protected bool DoHelloNeighbourCall(RegionInfo region, RegionInfo thisRegion) protected bool DoHelloNeighbourCall(RegionInfo region, RegionInfo thisRegion)
{ {
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/"; 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); WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
HelloNeighbourRequest.Method = "POST"; HelloNeighbourRequest.Method = "POST";
@ -681,11 +681,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{ {
//m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called"); //m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called");
//Console.WriteLine("---------------------------"); //m_log.Debug("---------------------------");
//Console.WriteLine(" >> uri=" + request["uri"]); //m_log.Debug(" >> uri=" + request["uri"]);
//Console.WriteLine(" >> content-type=" + request["content-type"]); //m_log.Debug(" >> content-type=" + request["content-type"]);
//Console.WriteLine(" >> http-method=" + request["http-method"]); //m_log.Debug(" >> http-method=" + request["http-method"]);
//Console.WriteLine("---------------------------\n"); //m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable(); Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html"; 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) 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")) if (action.Equals("release"))
m_localBackend.SendReleaseAgent(regionHandle, id, ""); m_localBackend.SendReleaseAgent(regionHandle, id, "");
@ -852,11 +852,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{ {
//m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called"); //m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
//Console.WriteLine("---------------------------"); //m_log.Debug("---------------------------");
//Console.WriteLine(" >> uri=" + request["uri"]); //m_log.Debug(" >> uri=" + request["uri"]);
//Console.WriteLine(" >> content-type=" + request["content-type"]); //m_log.Debug(" >> content-type=" + request["content-type"]);
//Console.WriteLine(" >> http-method=" + request["http-method"]); //m_log.Debug(" >> http-method=" + request["http-method"]);
//Console.WriteLine("---------------------------\n"); //m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable(); Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html"; responsedata["content_type"] = "text/html";
@ -964,11 +964,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
{ {
//m_log.Debug("[CONNECTION DEBUGGING]: RegionHandler Called"); //m_log.Debug("[CONNECTION DEBUGGING]: RegionHandler Called");
//Console.WriteLine("---------------------------"); //m_log.Debug("---------------------------");
//Console.WriteLine(" >> uri=" + request["uri"]); //m_log.Debug(" >> uri=" + request["uri"]);
//Console.WriteLine(" >> content-type=" + request["content-type"]); //m_log.Debug(" >> content-type=" + request["content-type"]);
//Console.WriteLine(" >> http-method=" + request["http-method"]); //m_log.Debug(" >> http-method=" + request["http-method"]);
//Console.WriteLine("---------------------------\n"); //m_log.Debug("---------------------------\n");
Hashtable responsedata = new Hashtable(); Hashtable responsedata = new Hashtable();
responsedata["content_type"] = "text/html"; responsedata["content_type"] = "text/html";

View File

@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
//m_scene.ForEachScenePresence(delegate (ScenePresence sp) { //m_scene.ForEachScenePresence(delegate (ScenePresence sp) {
// if (!sp.IsChildAgent && sp.UUID == remoteClient.AgentId) // 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); // 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) public OSD RequestRezAvatarMethod(string path, OSD request)
{ {
//System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString()); //m_log.Debug("[REQUESTREZAVATAR]: " + request.ToString());
OSDMap requestMap = (OSDMap)request; 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; return responseMap;
} }

View File

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

View File

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

View File

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

View File

@ -333,7 +333,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
} }
else 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.CoreModules.World.Terrain.PaintBrushes;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using log4net;
using System.Reflection;
namespace OpenSim.Region.CoreModules.World.Terrain.Effects namespace OpenSim.Region.CoreModules.World.Terrain.Effects
{ {
internal class CookieCutter : ITerrainEffect internal class CookieCutter : ITerrainEffect
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
#region ITerrainEffect Members #region ITerrainEffect Members
public void RunEffect(ITerrainChannel map) 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[,] smoothMask = new bool[map.Width,map.Height];
bool[,] allowMask = 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 // Step one, generate rough mask
int x, y; int x, y;
@ -52,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
{ {
for (y = 0; y < map.Height; y++) for (y = 0; y < map.Height; y++)
{ {
Console.Write("."); m_log.Info(".");
smoothMask[x, y] = true; smoothMask[x, y] = true;
allowMask[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); //smooth.FloodEffect(map, smoothMask, 4.0);
Console.WriteLine("S3"); m_log.Info("S3");
for (x = 0; x < map.Width; x++) for (x = 0; x < map.Width; x++)
{ {
for (y = 0; y < map.Height; y++) 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 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; return imageData;

View File

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

View File

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

View File

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

View File

@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
{ {
isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile); isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile);
realHandle = m_hg.FindRegionHandle(regionHandle); 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 /// Hypergrid mod stop

View File

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

View File

@ -1538,7 +1538,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </returns> /// </returns>
public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp, bool silent) public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp, bool silent)
{ {
//Console.WriteLine(" >>> CrossPrimGroupIntoNewRegion <<<"); //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
bool successYN = false; bool successYN = false;
grp.RootPart.UpdateFlag = 0; grp.RootPart.UpdateFlag = 0;
@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool IncomingCreateObject(ISceneObject sog) 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; SceneObjectGroup newObject;
try try
{ {
@ -2482,7 +2482,7 @@ namespace OpenSim.Region.Framework.Scenes
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData) 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); ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null) if (childAgentUpdate != null)
{ {
@ -2924,7 +2924,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="cmdparams"></param> /// <param name="cmdparams"></param>
public void HandleEditCommand(string[] cmdparams) public void HandleEditCommand(string[] cmdparams)
{ {
Console.WriteLine("Searching for Primitive: '" + cmdparams[2] + "'"); m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'");
List<EntityBase> EntityList = GetEntities(); List<EntityBase> EntityList = GetEntities();
@ -2941,7 +2941,7 @@ namespace OpenSim.Region.Framework.Scenes
new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]), new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]),
Convert.ToSingle(cmdparams[5]))); 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) 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()); client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
} }

View File

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

View File

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

View File

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

View File

@ -320,7 +320,7 @@ namespace OpenSim.Region.Framework.Scenes
protected SceneObjectPart(SerializationInfo info, StreamingContext context) protected SceneObjectPart(SerializationInfo info, StreamingContext context)
{ {
//System.Console.WriteLine("SceneObjectPart Deserialize BGN"); //m_log.Debug("SceneObjectPart Deserialize BGN");
m_TextureAnimation = new byte[0]; m_TextureAnimation = new byte[0];
m_particleSystem = new byte[0]; m_particleSystem = new byte[0];
if (info == null) if (info == null)
@ -333,7 +333,7 @@ namespace OpenSim.Region.Framework.Scenes
m_ids = (List<UUID>)info.GetValue("m_ids", typeof(List<UUID>)); 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; Rezzed = DateTime.Now;
m_inventory = new SceneObjectPartInventory(this); m_inventory = new SceneObjectPartInventory(this);
@ -534,7 +534,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
catch (Exception e) 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) 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; // PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) == 0) if ((ObjectFlags & (uint) flag) == 0)
{ {
//Console.WriteLine("Adding flag: " + ((PrimFlags) flag).ToString()); //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
_flags |= flag; _flags |= flag;
if (flag == PrimFlags.TemporaryOnRez) if (flag == PrimFlags.TemporaryOnRez)
ResetExpire(); ResetExpire();
} }
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString()); // m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
} }
/// <summary> /// <summary>
@ -2197,10 +2197,10 @@ if (m_shape != null) {
// PrimFlags prevflag = Flags; // PrimFlags prevflag = Flags;
if ((ObjectFlags & (uint) flag) != 0) if ((ObjectFlags & (uint) flag) != 0)
{ {
//Console.WriteLine("Removing flag: " + ((PrimFlags)flag).ToString()); //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString());
_flags &= ~flag; _flags &= ~flag;
} }
//System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//ScheduleFullUpdate(); //ScheduleFullUpdate();
} }
@ -3552,7 +3552,7 @@ if (m_shape != null) {
{ {
RemFlag(PrimFlags.TemporaryOnRez); 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; ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate(); ScheduleFullUpdate();

View File

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

View File

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

View File

@ -27,11 +27,15 @@
using System; using System;
using OpenMetaverse; using OpenMetaverse;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Framework.Scenes.Scripting namespace OpenSim.Region.Framework.Scenes.Scripting
{ {
public class NullScriptHost : IScriptHost public class NullScriptHost : IScriptHost
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Vector3 m_pos = new Vector3(128, 128, 30); private Vector3 m_pos = new Vector3(128, 128, 30);
public string Name public string Name
@ -80,7 +84,7 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
public void SetText(string text, Vector3 color, double alpha) 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()) //foreach (Type _t in a.GetTypes())
//{ //{
// Console.WriteLine("Type: " + _t.ToString()); // m_log.Debug("Type: " + _t.ToString());
//} //}
Type t; Type t;

View File

@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();
// Know what's not thread safe in Mono... modifying timers. // 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) lock (m_report)
{ {
uint regionFlags = 0; uint regionFlags = 0;

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 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 // 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)); Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
} }

View File

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

View File

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

View File

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

View File

@ -35,6 +35,8 @@ using OpenMetaverse.Imaging;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using PrimMesher; using PrimMesher;
using log4net;
using System.Reflection;
namespace OpenSim.Region.Physics.Meshing namespace OpenSim.Region.Physics.Meshing
{ {
@ -57,6 +59,7 @@ namespace OpenSim.Region.Physics.Meshing
public class Meshmerizer : IMesher 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); //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 // 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) private void ReportPrimError(string message, string primName, PrimMesh primMesh)
{ {
Console.WriteLine(message); m_log.Error(message);
Console.WriteLine("\nPrim Name: " + primName); m_log.Error("\nPrim Name: " + primName);
Console.WriteLine("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString()); m_log.Error("****** PrimMesh Parameters ******\n" + primMesh.ParamsToDisplayString());
} }
@ -185,17 +188,17 @@ namespace OpenSim.Region.Physics.Meshing
} }
catch (DllNotFoundException) 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; return null;
} }
catch (IndexOutOfRangeException) 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; return null;
} }
catch (Exception) 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; return null;
} }
@ -285,7 +288,7 @@ namespace OpenSim.Region.Physics.Meshing
if (profileEnd > 1.0f) profileEnd = 1.0f; if (profileEnd > 1.0f) profileEnd = 1.0f;
} }
#if SPAM #if SPAM
Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString()); m_log.Debug("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
#endif #endif
try try
{ {
@ -316,7 +319,7 @@ namespace OpenSim.Region.Physics.Meshing
if (profileEnd > 1.0f) profileEnd = 1.0f; if (profileEnd > 1.0f) profileEnd = 1.0f;
} }
#if SPAM #if SPAM
Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString()); m_log.Debug("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
#endif #endif
try try
{ {
@ -378,7 +381,7 @@ namespace OpenSim.Region.Physics.Meshing
if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh) if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
{ {
#if SPAM #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" ); minSizeForComplexMesh.ToString() + " - creating simple bounding box" );
#endif #endif

View File

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

View File

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

View File

@ -2507,7 +2507,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
else 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; _zeroFlag = false;
} }
@ -2569,7 +2569,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_rotationalVelocity.setValues(rotvel.X, rotvel.Y, rotvel.Z); 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.X = ori.X;
_orientation.Y = ori.Y; _orientation.Y = ori.Y;
_orientation.Z = ori.Z; _orientation.Z = ori.Z;

View File

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