From 2f398231acda79e313c2975ecdd5a6015cb71a54 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 23 Apr 2012 15:31:45 +0300 Subject: 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]"). --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 23a4cf9..a9b6e67 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -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); } } -- cgit v1.1