From 4875a3dd9b183dcd2256e2abfc4ccf7484c233b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 7 Dec 2022 13:17:14 +0100 Subject: New upstream version 4.0.2 --- src/include/xblog.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 src/include/xblog.h (limited to 'src/include/xblog.h') diff --git a/src/include/xblog.h b/src/include/xblog.h new file mode 100755 index 0000000..e78f476 --- /dev/null +++ b/src/include/xblog.h @@ -0,0 +1,66 @@ +/* xblog.h + +XBase64 Software Library + +Copyright (c) 1997,2003,2014,2022 Gary A Kunkel + +The xb64 software library is covered under the terms of the GPL Version 3, 2007 license. + +Email Contact: + + XDB-devel@lists.sourceforge.net + XDB-users@lists.sourceforge.net + +*/ + +#ifndef __XB_XBLOG_H__ +#define __XB_XBLOG_H__ + +#ifdef CMAKE_COMPILER_IS_GNUCC +#pragma interface +#endif + +namespace xb{ + +#ifdef XB_LOGGING_SUPPORT + +//! @brief xbLog class. +/*! +The xbLog class handles message logging functions. + +If logging is enabled in an application, error messages are printed +in the log file. + +Once a logfile reaches a predefined size, the logfile is closed, renamed +and opened. + +The logging functions can be accessed through the xbXBase class. +Each application has one of those. +*/ + +class XBDLLEXPORT xbLog : public xbFile { + public: + xbLog(); + xbLog( const xbString &sLogFileName ); + ~xbLog(); + + xbInt16 LogClose (); + xbInt16 LogGetStatus (); + xbInt16 LogOpen (); + void LogSetStatus ( xbBool bLogStatus ); + void LogSetLogSize( size_t lSize ); // { LogSize = size; } + xbInt16 LogWrite ( const xbString &LogEntry, xbInt16 iOutputOption = 0 ); + xbInt16 LogWriteBytes( xbUInt32 lByteCnt, const char *p ); + + private: + xbBool bLoggingStatus; // false = logging off + // true = logging on + size_t lLogSize; + xbInt16 iShareMode; +}; + +#endif // XB_LOGGING_SUPPORT +} // namespace +#endif // XB_XBLOG_H__ + + -- cgit v1.2.3