// FileLog.h: interface for the CFileLog class.
//
//////////////////////////////////////////////////////////////////////
#pragma once

#include <string>

class CFileLog
{
public:
    CFileLog();
    virtual ~CFileLog();

    void   SetFilename(std::string csFilename);
    void   SetHeaderString(std::string csHeaderString);
    void   LogData(std::string csData, bool bCreateNew = false);
    void   LogDataToFile(std::string csFileName, std::string csData, bool bCreateNew = false);
	void   EnableRunningNumber(bool bEnable, std::string csHeader);
private:
	std::string GetLogFileNameWithRunningNumber(std::string csFileName);
	std::string RemoveFileExtension(std::string csFullName, std::string csRemoveExt, std::string newExt);
	std::string IncAndReturnRunningLotNumberFile(std::string csFileName);
    //
    std::string GetTime();
    std::string GetYYYYMMDD();

    /////
    // Variables
    ////
    std::string m_strFilename;
    std::string m_strFilenameExt;
    std::string m_strFolderName;
    std::string m_strPathFilename;
    std::string m_strFileExt;
    std::string m_strHeaderString;
	std::string m_strConfigHeader;

	long    m_lFileNo;
    bool    m_bHeaderCreated;
    bool    m_bLogTimeStamp;
    bool    m_bLogDailyFormat;
	bool    m_bSaveWithRunningNumber;
};
