[Mono-list] Trace output: Where to change my default path "C:\output.log"

mcmurphy120 jkmuc at web.de
Mon May 7 01:15:20 EDT 2007


Hi all,

I have a simple .Net program compiled with VS2005 which I want to run in
Ubuntu. There is a mysql-connection which throws an exception when opening
(the database is installed and up of course):

Unhandled Exception: System.IO.IOException: Win32 IO returned 25. Path:
c:\output.log
  at System.IO.Directory.Exists (System.String path) [0x00000] 
  at System.IO.FileStream..ctor (System.String name, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous,
FileOptions options) [0x00000] 
  at System.IO.FileStream..ctor (System.String name, FileMode mode,
FileAccess access, FileShare share) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor
(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.StreamWriter..ctor (System.String path, Boolean append,
System.Text.Encoding encoding, Int32 bufferSize) [0x00000] 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append)
[0x00000] 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor
(string,bool)
  at System.IO.File.AppendText (System.String path) [0x00000] 
  at System.Diagnostics.TextWriterTraceListener..ctor (System.String
fileName, System.String name) [0x00000] 
  at System.Diagnostics.TextWriterTraceListener..ctor (System.String
fileName) [0x00000] 
  at (wrapper remoting-invoke-with-check)
System.Diagnostics.TextWriterTraceListener:.ctor (string)
  at MySql.Data.MySqlClient.MySqlConnection..ctor () [0x00000] 
  at MySql.Data.MySqlClient.MySqlConnection..ctor (System.String
connectionString) [0x00000] 
  at (wrapper remoting-invoke-with-check)
MySql.Data.MySqlClient.MySqlConnection:.ctor (string)

I suppose the problem is that of course Ubuntu can't find the windows path
"C:\output.log". It seem that the Trace-Mechansim uses this path for default
output. 

My question: Where is this path defined? I cannot find the piece of code
which tell the TextWriter to use "C:\output.log". Where can I change it?

I tried to define a new Trace listener in application.config, but this new
Tracelistener is just "added", so the application still tries to write
additionally in "c:\output.log"

Thank you very much for any hints,

Bernd
Munich

mono 1.2.3.1
Ubuntu 7.04
mysql-connector 5.0.0.0
-- 
View this message in context: http://www.nabble.com/Trace-output%3A-Where-to-change-my-default-path-%22C%3A%5Coutput.log%22-tf3701943.html#a10352247
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list