Minor improvements to logging

Eliminated an extra newline in the console if the log line doesn't contain a category (example of a category: "[ASSETS]").
This commit is contained in:
Oren Hurvitz
2012-04-23 15:31:45 +03:00
committed by Justin Clark-Casey (justincc)
parent d3a4d67a20
commit 2f398231ac
6 changed files with 24 additions and 12 deletions

View File

@@ -1812,9 +1812,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
// if there already exists a file at that location, it may be locked.
m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message);
}
string textpath = path + ".text";
try
{
using (FileStream fs = File.Create(path + ".text"))
using (FileStream fs = File.Create(textpath))
{
using (StreamWriter sw = new StreamWriter(fs))
{
@@ -1827,7 +1829,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
catch (IOException ex)
{
// if there already exists a file at that location, it may be locked.
m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message);
m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", textpath, ex.Message);
}
}
}
@@ -1876,7 +1878,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
catch (IOException ex)
{
// if there already exists a file at that location, it may be locked.
m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", statepath, ex.Message);
m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", mappath, ex.Message);
}
}