"Fossies" - the Fresh Open Source Software Archive

Member "vfu-4.18/vslib/dlog.h" (4 May 2015, 1033 Bytes) of package /linux/privat/vfu-4.18.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dlog.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 4.15_vs_4.16.

    1 /****************************************************************************
    2  *
    3  * (c) Vladi Belperchinov-Shabanski "Cade" 1996-2015
    4  * http://cade.datamax.bg/  <cade@biscom.net> <cade@bis.bg> <cade@datamax.bg>
    5  *
    6  * SEE `README',`LICENSE' OR `COPYING' FILE FOR LICENSE AND OTHER DETAILS!
    7  *
    8  ****************************************************************************/
    9 
   10 #ifndef _DLOG_H_
   11 #define _DLOG_H_
   12 
   13 #include <stdio.h>
   14 
   15 #define LOG( what ) log( __FILE__, __LINE__, what )
   16 #define LOGN( what, n ) log( __FILE__, __LINE__, what, n )
   17 
   18 class TLogFile
   19 {
   20   FILE *f;
   21   char log_fn[255];
   22   int keep_open;
   23 
   24   public:
   25 
   26   int on_stdout;
   27   int on_stderr;
   28 
   29   TLogFile();
   30   ~TLogFile();
   31 
   32   void create( const char *fname, int pkeep_open );
   33   void open();
   34   void close();
   35 
   36   void log( const char *fname, int line, const char *msg );
   37   void log( const char *fname, int line, const char *msg, int n );
   38   void log( const char *msg );
   39   void log( const char *msg, int n );
   40   void log( const char *msg, const char *arg );
   41 
   42 };
   43 
   44 #endif //_DLOG_H_