1#ifndef LOGFILE_INCLUDED
2#define LOGFILE_INCLUDED
bool flush()
Flush any unwritten content from the stream's buffer to the associated file.
Definition: logfile.cc:34
void close()
Close the given file stream.
Definition: logfile.cc:78
bool write(const char *data, std::size_t length)
Write the contents in data array to a file.
Definition: logfile.cc:65
FILE * m_file
Definition: logfile.h:85
std::size_t bytes_written() const
Return number bytes written into a log file.
Definition: logfile.h:49
std::size_t m_bytes_written
Definition: logfile.h:86
char m_filename[FN_REFLEN]
Definition: logfile.h:84
void show_tail(unsigned int lines)
Print the last N number of lines from a file to stderr.
Definition: logfile.cc:88
virtual ~Logfile()
Definition: logfile.h:39
const char * file_name() const
Return file name.
Definition: logfile.h:44
bool open(const char *dirname, const char *filename, const char *ext)
Construct a file path using directory name, file name and extension arguments and open it in write/up...
Definition: logfile.cc:45
Logfile()
Definition: logfile.cc:30
Logfile(const Logfile &)=default
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
Common header for many mysys elements.
const std::string FILE("FILE")
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Json_data_extension ext
Definition: backend.cc:50
std::string dirname(const std::string &path)
Definition: utilities.cc:38
const char * filename
Definition: pfs_example_component_population.cc:67