1 /* opkg_message.c - the opkg package management system
3 Copyright (C) 2003 Daniele Nicolodi <daniele@grinta.net>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2, or (at
8 your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
18 #include "opkg_conf.h"
19 #include "opkg_message.h"
21 opkg_message_callback opkg_cb_message
= NULL
;
24 opkg_message (opkg_conf_t
* conf
, message_level_t level
, char *fmt
, ...)
30 vsnprintf (ts
,256,fmt
, ap
);
35 opkg_cb_message(conf
,level
,ts
);
39 char *level_s
[5] = {"ERROR", "NOTICE", "INFO", "DEBUG", "DEBUG2"};
40 if (level
<= conf
->verbosity
)
41 printf ("opkg-%s: %s", level_s
[level
], ts
);