- if (pLogName && fileloglevel>=0)
- logFile = fopen(pLogName, "a+");
+void setConsoleLogging(int level)
+{
+ if(level>maxloglevel)
+ maxloglevel=level;
+ screenloglevel = level;
+}
+void setFileLogging(char*filename, int level, char append)
+{
+ if(level>maxloglevel)
+ maxloglevel=level;
+ if(logFile) {
+ fclose(logFile);logFile=0;
+ }
+ if(filename && level>=0) {
+ logFile = fopen(filename, append?"ab+":"wb");
+ fileloglevel = level;
+ } else {
+ logFile = 0;
+ fileloglevel = 0;
+ }
+}
+/* deprecated */
+void initLog(char* filename, int fileloglevel, char* s00, char* s01, int s02, int screenlevel)
+{
+ setFileLogging(filename, fileloglevel, 0);
+ setConsoleLogging(screenloglevel);