This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| void | Log_Close (void) |
| FILE * | Log_FileStruct (void) |
| void | Log_Flush (void) |
| void | Log_Open (char *filename) |
| void | Log_Print (char *fmt,...) |
| void | Log_Shutdown (void) |
| void | Log_Write (char *fmt,...) |
| void | Log_WriteTimeStamped (char *fmt,...) |
|
|
Definition at line 86 of file l_log.c. References botimport, fclose(), logfile_s::filename, logfile_s::fp, logfile, printf(), PRT_ERROR, and PRT_MESSAGE. 00087 {
00088 if (!logfile.fp) return;
00089 if (fclose(logfile.fp))
00090 {
00091 botimport.Print(PRT_ERROR, "can't close log file %s\n", logfile.filename);
00092 return;
00093 } //end if
00094 logfile.fp = NULL;
00095 botimport.Print(PRT_MESSAGE, "Closed log %s\n", logfile.filename);
00096 } //end of the function Log_Close
|
Here is the call graph for this function:

|
|
Definition at line 201 of file l_log.c. References logfile_s::fp, and logfile.
|
|
|
Definition at line 165 of file l_log.c. References fflush(), logfile_s::fp, and logfile.
|
Here is the call graph for this function:

|
|
Definition at line 58 of file l_log.c. References botimport, logfile_s::filename, fopen(), logfile_s::fp, LibVarValue(), logfile, MAX_LOGFILENAMESIZE, printf(), PRT_ERROR, PRT_MESSAGE, strlen(), and strncpy(). Referenced by Export_BotLibSetup(), and main(). 00059 {
00060 if (!LibVarValue("log", "0")) return;
00061 if (!filename || !strlen(filename))
00062 {
00063 botimport.Print(PRT_MESSAGE, "openlog <filename>\n");
00064 return;
00065 } //end if
00066 if (logfile.fp)
00067 {
00068 botimport.Print(PRT_ERROR, "log file %s is already opened\n", logfile.filename);
00069 return;
00070 } //end if
00071 logfile.fp = fopen(filename, "wb");
00072 if (!logfile.fp)
00073 {
00074 botimport.Print(PRT_ERROR, "can't open the log file %s\n", filename);
00075 return;
00076 } //end if
00077 strncpy(logfile.filename, filename, MAX_LOGFILENAMESIZE);
00078 botimport.Print(PRT_MESSAGE, "Opened log %s\n", logfile.filename);
00079 } //end of the function Log_Create
|
Here is the call graph for this function:

|
||||||||||||
Here is the call graph for this function:

|
|
Definition at line 103 of file l_log.c. References logfile_s::fp, Log_Close(), and logfile.
|
Here is the call graph for this function:

|
||||||||||||
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 130 of file l_log.c. References botlibglobals, fflush(), logfile_s::fp, fprintf(), logfile, logfile_s::numwrites, QDECL, botlib_globals_s::time, va_end, va_list, va_start, and vfprintf(). 00131 {
00132 va_list ap;
00133
00134 if (!logfile.fp) return;
00135 fprintf(logfile.fp, "%d %02d:%02d:%02d:%02d ",
00136 logfile.numwrites,
00137 (int) (botlibglobals.time / 60 / 60),
00138 (int) (botlibglobals.time / 60),
00139 (int) (botlibglobals.time),
00140 (int) ((int) (botlibglobals.time * 100)) -
00141 ((int) botlibglobals.time) * 100);
00142 va_start(ap, fmt);
00143 vfprintf(logfile.fp, fmt, ap);
00144 va_end(ap);
00145 fprintf(logfile.fp, "\r\n");
00146 logfile.numwrites++;
00147 fflush(logfile.fp);
00148 } //end of the function Log_Write
|
Here is the call graph for this function:

1.3.9.1