Ignore:
Timestamp:
Apr 13, 2010, 6:45:35 PM (15 years ago)
Author:
Silvan Scherrer
Message:

client 1.5: samba logging part1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/client-1.5/src/smbwrp.c

    r189 r434  
    2323#include "smbwrp.h"
    2424
     25#include "includes.h"
     26
     27void smbwrp_Logging()
     28{
     29        char slogfile[_MAX_PATH +1] = {0};
     30        char slogfilename[] = "samba.log";
     31        char *env = getenv("LOGFILES");
     32                if (env != NULL)
     33                {
     34                   strncpy(slogfile, env, sizeof(slogfile) -1);
     35                   strncat(slogfile, "\\", sizeof(slogfile) - strlen(slogfile) -1);
     36                   strncat(slogfile, slogfilename, sizeof(slogfile) - strlen(slogfile) -1);
     37                }
     38                else
     39                {
     40                   strncpy(slogfile, slogfilename, sizeof(slogfile) -1);
     41                }
     42
     43                // init samba for debug messages
     44                debug_init();
     45                setup_logging(slogfile, false);
     46                debug_parse_levels("9");
     47}
    2548
    2649static int
Note: See TracChangeset for help on using the changeset viewer.