|
|
|
|
|||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
setting up logging in executables that link to samba libraries
Am having trouble setting up the cifs.upcall program to log to samba
logs (/usr/local/samba33/var/log.*) Apparently the following is not enough to get debug(0, messages to log. setup_logging(argv[0], false); load_case_tables(); reopen_logs(); I did a quick test by checking lp_loaded's value after these lines and it shows as false. What sets lp_loaded to true? Am I missing an init step. This runs in the background (launched by keyctl daemon) so would be nice to be able to log the samba client lib calls it invokes (wasn't able to get the samba client lib calls to log to syslog either with the ./configure and smb.conf having "syslog = 10"). Any idea if there is a missing setup call that an executable needs to do before enabling logging? -- Thanks, Steve |
|
#2
|
|||
|
|||
|
setting up logging in executables that link to samba libraries
Steve French wrote:
Am having trouble setting up the cifs.upcall program to log to samba logs (/usr/local/samba33/var/log.*) Apparently the following is not enough to get debug(0, messages to log. setup_logging(argv[0], false); load_case_tables(); reopen_logs(); Hi Steve, I think you have to do the following: INIT /* track talloc null_context memory */ talloc_enable_null_tracking(); load_case_tables(); setup_logging(argv[0], false); /* get_dyn_CNFIGFILE points to the std location. If that fails, * it silently ignores it and use the internal defaults. */ lp_load(get_dyn_CNFIGFILE(), True, False, False, False); reopen_logs(); FREE gfree_names(); gfree_loadparm(); gfree_case_tables(); gfree_charcnv(); /* release the talloc null_context memory last */ talloc_disable_null_tracking(); gfree_debugsyms(); -- andreas |
![]() |
| Viewing: Web Development Archives > Mailing Lists > Samba > setting up logging in executables that link to samba libraries |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|