void VolcadoFichero::generarLogDiario() {

	string nombreFichero;

	nombreFichero = "gastroedi_" + getFecha() + ".log";

	fsal.open(nombreFichero.c_str());
}
Exemplo n.º 2
0
#include "Log.h"

Log* Log::instance = NULL;
const long long Log::microsegundosInicial = getMicrosegundos();
const string Log::nombreArchivo = string( PATH_LOG ) + getFecha() + getHora() + string( EXTENSION_LOG );

Log::Log()
 : modoDebug ( false ),
   logFile ( (char*) nombreArchivo.c_str() )
{

	cout.setf( ios::fixed );
	cout.precision( PRECISION_SEGUNDOS );

}



Log* Log::getInstance()
{
	if ( instance == NULL ) {
		instance = new Log();
	}
	return instance;
}

void Log::destruir ()
{
	if ( instance != NULL ) {