/*=============================================================================
Copyright (C) 2001 Silicon Tao Technology Systems
E-mail: Support
Web: www.silicontao.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
=============================================================================*/
/*=============================================================================
File Name: STAppLogging.h
Object Name: STAppLogging
Programmer Name: Roy Souther
By Command of: Silicon Tao Technology Systems
License:
Day Zero: 04222000, April 22, 2000
Target Platform: Linux
Registors Used:
Compiler Used: GNU g++
Compiled Settings:
Resources Used:
Libraries Used:
Ports Used: None
Title of program: Object library
Discription:
=============================================================================*/
#ifndef STAppLogging_included
#define STAppLogging_included
#include
#include
#include
#include
#include
/**
* Provides logging to text files in the directory that the application is running in.
* Or in another directory of your choice.
*
*
* Example:
*
* STAppLogging *MyLog;
* MyLog = new STAppLogging();
* MyLog->Log("My app is running ok at this line.");
* delete MyLog;
*
*
* @short Application logging.
*/
class STAppLogging
{
private:
/**
*
*/
//
protected:
/**
*
*/
//
public:
/**
* The name of the log file that logs are writen to.
*/
char *LogFile;
/**
* The path where the log file is located. Usualy it is the same as the applications path.
*/
char *LogFilePath;
/**
* Set this to turn logging on or off. By default it is set to off when started.
*
* True = logs will be write to log file, False = logs will be ignored
*/
bool LoggingOn;
/**
* Constructor
*/
STAppLogging();
/**
* Destructor
*/
~STAppLogging();
/**
* Unrestrict file permissions.
*/
int ShareFileWithEveryOne();
/**
* Change the name of the log file.
*/
int SetLogFileName(const char *NewName);
/**
* Change the name of the log file.
*/
int SetLogFileName(QString &NewName);
/**
* Change the path to the log file.
*/
int SetLogFilePath(const char *NewPath);
/**
* Write a log to log file.
*/
int Log(QString &TextToLog);
/**
* Write a log to log file.
*/
int Log(const char *TextToLog);
/**
* Delete all logs in log file.
*/
int ClearLog(void);
};
#endif // STAppLogging_included
Generated by: root on UtopiaPlanitia.Ept on Mon Dec 10 22:55:12 2001, using kdoc 2.0a53. |