areaDetector  3-5-0
EPICS areaDetector framework
Public Member Functions | Protected Types | Protected Attributes | List of all members
log_file Class Reference

Class LOG_FILE. More...

#include <logfile.h>

Public Member Functions

 log_file (char *filename)
 Provide a log file to screen and files. More...
 
 ~log_file ()
 destroy file object. More...
 
void enableLog (bool is_en)
 True.False to enable or disable logs to the file. More...
 
void log (char *message)
 write message or string to log file w/ current date time. More...
 
void logNoDate (char *message)
 write string to logfile w/ no timestamp. More...
 
void puts (char *message, int len)
 low level write to log file. More...
 
void enablePrintf (bool is_pr)
 true.false to enable print logs to screen as well as file. More...
 

Protected Types

enum  { num_saved_files = 5 }
 

Protected Attributes

FILE * fp
 
char log_file_name [255]
 
bool is_enabled
 
bool is_printf
 

Detailed Description

Class LOG_FILE.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
num_saved_files 

Constructor & Destructor Documentation

◆ log_file()

log_file::log_file ( char *  filename)

Provide a log file to screen and files.

writes log messages to fie with date and times.

Author
Tim Madden
Date
2003 constructor, give filename to write to. Like "C:/a/b/cc/dd.txt" or linux name like "/hello/meme/logs/me.txt"

◆ ~log_file()

log_file::~log_file ( )

destroy file object.

Member Function Documentation

◆ enableLog()

void log_file::enableLog ( bool  is_en)

True.False to enable or disable logs to the file.

◆ enablePrintf()

void log_file::enablePrintf ( bool  is_pr)

true.false to enable print logs to screen as well as file.

◆ log()

void log_file::log ( char *  message)

write message or string to log file w/ current date time.

also writes to screen.

◆ logNoDate()

void log_file::logNoDate ( char *  message)

write string to logfile w/ no timestamp.

◆ puts()

void log_file::puts ( char *  message,
int  len 
)

low level write to log file.

string and lengt of string.

Member Data Documentation

◆ fp

FILE* log_file::fp
protected

◆ is_enabled

bool log_file::is_enabled
protected

◆ is_printf

bool log_file::is_printf
protected

◆ log_file_name

char log_file::log_file_name[255]
protected

The documentation for this class was generated from the following files: