/[LeafOK_CVS]/lbbs/include/log.h
ViewVC logotype

Diff of /lbbs/include/log.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 by sysadm, Tue May 6 05:31:26 2025 UTC Revision 1.8 by sysadm, Sat Jun 21 02:15:18 2025 UTC
# Line 17  Line 17 
17  #ifndef _LOG_H_  #ifndef _LOG_H_
18  #define _LOG_H_  #define _LOG_H_
19    
20  #include <stddef.h>  #include <stdio.h>
21    
22  extern int log_begin(char *file_log_std, char *file_log_err);  enum{
23            LOG_LEVEL_COMMON = 1,
24            LOG_LEVEL_ERROR = 2,
25    };
26    
27    extern int log_begin(char *common_log_file, char *error_log_file);
28  extern void log_end();  extern void log_end();
29    
30  extern int log_head(char *buf, size_t len);  extern int log_printf(int log_level, const char *app_file, int app_line, const char *format, ...);
31    
32  extern int log_std(const char *format, ...);  #define log_common(...) log_printf(LOG_LEVEL_COMMON, __FILE__, __LINE__, __VA_ARGS__)
33    #define log_error(...) log_printf(LOG_LEVEL_ERROR, __FILE__, __LINE__, __VA_ARGS__)
34    
35  extern int log_error(const char *format, ...);  extern int log_common_redir(int fd);
36    extern int log_error_redir(int fd);
 extern int log_std_redirect(int fd);  
   
 extern int log_err_redirect(int fd);  
37    
38  #endif //_LOG_H_  #endif //_LOG_H_


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1