mouratos66 / vtuner

Automatically exported from code.google.com/p/vtuner
0 stars 0 forks source link

Spamming logfiles #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. run vtunerd on arm, vtunerc on x86_64
2. logfiles quickly filling up with debug and info messages

What is the expected output? What do you see instead?

I expect some instructions on how to set the level of spam sent to logfiles in 
the README.

What version of the product are you using? On what operating system?

Latest vtuner.apps from git, patched for DVB 5.4 api found here: 
http://www.nessiedvb.org/forum/viewtopic.php?f=11&t=72

Please provide any additional information below.

Quick fix: vtuner.apps: comment out parts in vtuner-utils.h
#define  INFO(mtype, msg, ...) 
//write_message(mtype, MSG_INFO,  "[%d %s:%u]  info: " msg, getpid(), __FILE__, 
__LINE__, ## __VA_ARGS__)
#define DEBUG(mtype, msg, ...) 
//write_message(mtype, MSG_DEBUG, "[%d %s:%u] debug: " msg, getpid(), __FILE__, 
__LINE__, ## __VA_ARGS__)

and: vtunerd-service.h 
#define DEBUGSRV(msg, ...)
// DEBUG(MSG_SRV, msg, ## __VA_ARGS__)

Quickfix: vtuner.linux-driver
vtunerc_ctrldev.c:    //dprintk(ctx, "msg VTUNER_GET_MESSAGE\n");
vtunerc_ctrldev.c:    //dprintk(ctx, "msg VTUNER_SET_RESPONSE\n");
and perhaps other dprintk ....

Apart from the lack of documentation it work very well. THANKS!

Original issue reported on code.google.com by paulsso...@gmail.com on 17 Feb 2014 at 9:57

GoogleCodeExporter commented 8 years ago
Adding "-v 1" to the command line should workaround this.
I agree, dbg_level = MSG_ERROR, would be a more sensible choice.

int dbg_level  = MSG_INFO;
...
// read only verbosity, to show value
while((c = getopt(argc, argv, “d:g:hl:p:u:v:”)) != -1)
  switch(c) {
    case 'v': // verbosity
      dbg_level = atoi(optarg);
      break;
  }

Original comment by rolmie@gmail.com on 17 Feb 2014 at 1:34