62 explicit Logging(
const std::string file_name,
const std::string FreeText_input);
83 void UseNewFile(
const std::string &newLogFile);
93 void WriteError(
const std::string FreeText_input);
100 void Write(
const std::string FreeText_input);
119 m_multiUserLog =
true;
157 std::ofstream &log_file_wrap, std::string &exe_name_wrap, std::string &user_name_wrap );
170 inline void writing_function(
const std::string &FreeText_wrap, std::ofstream &log_file_wrap,
171 const std::string &exe_name_wrap,
const std::string &user_name_wrap,
bool isError =
false );
175 std::ofstream log_file;
177 std::string exe_name;
179 std::string user_name;
183 std::string file_name_with_path;
189 bool m_multiUserLog =
false;
Logging()
Default constructor.
The logging class.
Definition: cbicaLogging.h:53
void writing_function(const std::string &FreeText_wrap, std::ofstream &log_file_wrap, const std::string &exe_name_wrap, const std::string &user_name_wrap, bool isError=false)
The function used to do the actual writing onto the file.
std::string getLoggingFileName()
Get the file name with full path where log has happened.
void EnableGMTLogging()
This enables logging the date and time in GMT rather than in local (which is the default behavior)
void EnableTextLogging(const std::string &newLogFile)
Switches from console to text file logging.
void Write(const std::string FreeText_input)
Function to call to write to log file.
void EnableMultiUserLogging()
This is useful in scenarios where the application has been installed in a multi-user machine.
Definition: cbicaLogging.h:117
void UseNewFile(const std::string &newLogFile)
Change Logging file after initializing class.
void WriteError(const std::string FreeText_input)
Function to call to write error messages to log file without any free text.
Some basic utility functions.
virtual ~Logging()
The Destructor.
void EnableConsoleLogging()
Switches from text to console file logging.
void initialize_class(std::string &file_name_with_path_wrap, std::ofstream &log_file_wrap, std::string &exe_name_wrap, std::string &user_name_wrap)
The function used to initialize the class.