Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: SV: [Ethereal-dev] What's changed with operational dissection?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 28 Oct 2005 12:13:03 +0200 (CEST)
Hi Richard,

Well maybe there is but it's not working anymore. See this snippet from
main.c line 2819.

-----8<-----
static void
console_log_handler(const char *log_domain, GLogLevelFlags log_level,
		    const char *message, gpointer user_data _U_)
{
  time_t curr;
  struct tm *today;
  const char *level;


  /* change this, if you want to see more verbose log output */
  /* XXX - make this a pref value */
  if( (log_level & G_LOG_LEVEL_MASK) > G_LOG_LEVEL_WARNING) {
    return;
  }

  ......
-----8<-----

And this may point to why printf doesn't work anymore (main.c line 1921)

-----8<-----
  /* the default_log_handler will use stdout, which makes trouble with the */
  /* capture child, as it uses stdout for it's sync_pipe */
  /* so do the filtering in the console_log_handler and not here */
-----8<-----

Shouldn't fprintf(stderr, ...) be replaced by g_print(), since, on the
Win32 platform, don't work?

Thanx,
Jaap

On Fri, 28 Oct 2005, Richard van der Hoff wrote:

> Jaap Keuter wrote:
> > Hi,
> >
> > Tried this lot at the top of my dissector:
> >
> >   printf("entering dissector for frame %d\n\r", pinfo->fd->num);
> >   fprintf(stderr, "fprintf: entering dissector for frame %d\n\r", pinfo->fd->num);
> >   g_print("g_print: entering dissector for frame %d\n\r", pinfo->fd->num);
> >   g_message("g_message: entering dissector for frame %d\n\r", pinfo->fd->num);
> >   g_warning("g_warning: entering dissector for frame %d\n\r", pinfo->fd->num);
> >
> > Only g_print() and g_warning() do produce output in the Ethereal Debug
> > Console window.
>
> there's a setting in the preferences file which allows you to set the
> log level if you want to see the output of g_message(), g_debug(), etc.
>
>
> --
> Richard van der Hoff <richardv@xxxxxxxxxxxxx>
> Systems Analyst
> Tel: +44 (0) 845 666 7778
> http://www.mxtelecom.com
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>