public Log ( string fileName, bool debugOutput ) : System | ||
fileName | string | Name of the log file to open. |
debugOutput | bool | Write log messages to the debug output? |
return | System |
public Log( string fileName, bool debugOutput )
{
this.mLogName = fileName;
this.MessageLogged = null;
this.debugOutput = debugOutput;
logLevel = LoggingLevel.Normal;
if ( fileName != null )
{
try
{
#if !( ANDROID )
// create the log file, or open
log = File.Open( fileName, FileMode.Create, FileAccess.Write, FileShare.Read );
// get a stream writer using the file stream
writer = new StreamWriter( log );
writer.AutoFlush = true; //always flush after write
#endif
}
catch
{
}
}
}
Log::Log ( string fileName ) : System |