[pacman-dev] alpm_option_set_logcb(), an example of usage

Xavier shiningxc at gmail.com
Tue Aug 12 16:52:32 EDT 2008


On Tue, Aug 12, 2008 at 10:49 PM, Imanol Celaya <archye at pycut.com.ar> wrote:
> Hi, I'm developing pyalpm at the moment(new codebase, not related to
> 2005 pyalpm) and I don't really see any example of usage of
> alpm_option_set_logcb()
> on pacman.c file there is alpm_option_set_logcb(cb_log); but I can't
> find where is cb_log declared, so I have no clue about what does that
> function do(as I haven't neither found where is the actual code of
> that function, only that is declared on alpm.h)

Why not just using grep or whatever :
$ grep -r cb_log src/pacman/*.c
src/pacman/callback.c:void cb_log(pmloglevel_t level, char *fmt, va_list args)
src/pacman/pacman.c:	alpm_option_set_logcb(cb_log);

All callbacks (cb) are defined in that callback.c file.



More information about the pacman-dev mailing list