tune logging
This commit is contained in:
parent
9e7de7965a
commit
81afc997c7
|
@ -775,7 +775,7 @@ void dispatch_stream_id(WS_CONNINFO *pwsc, int session, char *id) {
|
|||
"Transcoding '%s' (id %d)",
|
||||
pmp3->title,pmp3->id);
|
||||
|
||||
DPRINTF(E_LOG,L_WS,
|
||||
DPRINTF(E_WARN,L_WS,
|
||||
"Session %d: Streaming file '%s' to %s (offset %ld)\n",
|
||||
session,pmp3->fname, pwsc->hostname,(long)offset);
|
||||
|
||||
|
@ -850,7 +850,7 @@ void dispatch_stream_id(WS_CONNINFO *pwsc, int session, char *id) {
|
|||
|
||||
config_set_status(pwsc,session,"Streaming '%s' (id %d)",
|
||||
pmp3->title, pmp3->id);
|
||||
DPRINTF(E_LOG,L_WS,"Session %d: Streaming file '%s' to %s (offset %d)\n",
|
||||
DPRINTF(E_WARN,L_WS,"Session %d: Streaming file '%s' to %s (offset %d)\n",
|
||||
session,pmp3->fname, pwsc->hostname,(long)offset);
|
||||
|
||||
if(!offset)
|
||||
|
|
|
@ -293,8 +293,6 @@ int err_setlogfile(char *file) {
|
|||
* \param destination where to log to \ref log_dests "as defined in err.h"
|
||||
*/
|
||||
void err_setdest(int destination) {
|
||||
fprintf(stderr,"setting dest to %d\n",destination);
|
||||
|
||||
if(err_logdest == destination)
|
||||
return;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#define E_SPAM 10 /**< Logorrhea! */
|
||||
#define E_DBG 9 /**< Way too verbose */
|
||||
#define E_INF 5 /**< Good info, not too much spam */
|
||||
#define E_WARN 2 /**< Reasonably important, but not enough to log */
|
||||
#define E_WARN 2 /**< Goes in text log, but not syslog */
|
||||
#define E_LOG 1 /**< Something that should go in a log file */
|
||||
#define E_FATAL 0 /**< Log and force an exit */
|
||||
|
||||
|
|
11
src/main.c
11
src/main.c
|
@ -233,7 +233,7 @@ int main(int argc, char *argv[]) {
|
|||
int debuglevel=0;
|
||||
|
||||
config.use_mdns=1;
|
||||
err_setlevel(debuglevel);
|
||||
err_setlevel(2);
|
||||
|
||||
config.foreground=0;
|
||||
while((option=getopt(argc,argv,"D:d:c:P:mfrysiuvab:")) != -1) {
|
||||
|
@ -241,19 +241,23 @@ int main(int argc, char *argv[]) {
|
|||
case 'a':
|
||||
appdir = 1;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
ffid=optarg;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
debuglevel = atoi(optarg);
|
||||
err_setlevel(debuglevel);
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
if(err_setdebugmask(optarg)) {
|
||||
usage(argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
config.foreground=1;
|
||||
err_setdest(err_getdest() | LOGDEST_STDERR);
|
||||
|
@ -307,8 +311,9 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
if((getuid()) && (!force_non_root) && (!convert_conf)) {
|
||||
fprintf(stderr,"You are not root. This is almost certainly wrong. If you are\n"
|
||||
"sure you want to do this, use the -y command-line switch\n");
|
||||
fprintf(stderr,"You are not root. This is almost certainly wrong. "
|
||||
"If you are\nsure you want to do this, use the -y "
|
||||
"command-line switch\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,6 @@ char *os_realpath(const char *pathname, char *resolved_path) {
|
|||
int os_stat(const char *path, struct _stat *sb) {
|
||||
WCHAR utf16_path[PATH_MAX+1];
|
||||
|
||||
DPRINTF(E_LOG,L_MISC,"Statting %s\n",path);
|
||||
memset(utf16_path,0,sizeof(utf16_path));
|
||||
util_utf8toutf16((unsigned char *)&utf16_path,PATH_MAX * 2,(char*)path,(int)strlen(path));
|
||||
|
||||
|
|
Loading…
Reference in New Issue