예제 #1
0
파일: log.c 프로젝트: aixoss/wget
void
logputs (enum log_options o, const char *s)
{
  FILE *fp;
  FILE *warcfp;

  check_redirect_output ();
  if (o == LOG_PROGRESS)
    fp = get_progress_fp ();
  else
    fp = get_log_fp ();

  if (fp == NULL)
    return;

  warcfp = get_warc_log_fp ();
  CHECK_VERBOSE (o);

  FPUTS (s, fp);
  if (warcfp != NULL)
    FPUTS (s, warcfp);
  if (save_context_p)
    saved_append (s);
  if (flush_log_p)
    logflush ();
  else
    needs_flushing = true;
}
예제 #2
0
파일: log.c 프로젝트: DonCN/haiku
void
logputs (enum log_options o, const char *s)
{
  FILE *fp;

  check_redirect_output ();
  if ((fp = get_log_fp ()) == NULL)
    return;
  CHECK_VERBOSE (o);

  FPUTS (s, fp);
  if (save_context_p)
    saved_append (s);
  if (flush_log_p)
    logflush ();
  else
    needs_flushing = true;
}
예제 #3
0
파일: log.c 프로젝트: DonCN/haiku
void
logprintf (enum log_options o, const char *fmt, ...)
{
  va_list args;
  struct logvprintf_state lpstate;
  bool done;

  check_redirect_output ();
  if (inhibit_logging)
    return;
  CHECK_VERBOSE (o);

  xzero (lpstate);
  do
    {
      va_start (args, fmt);
      done = log_vprintf_internal (&lpstate, fmt, args);
      va_end (args);
    }
  while (!done);
}
예제 #4
0
파일: log.c 프로젝트: DonCN/haiku
/* The same as logprintf(), but does anything only if opt.debug is
   true.  */
void
debug_logprintf (const char *fmt, ...)
{
  if (opt.debug)
    {
      va_list args;
      struct logvprintf_state lpstate;
      bool done;

      check_redirect_output ();
      if (inhibit_logging)
        return;

      xzero (lpstate);
      do
        {
          va_start (args, fmt);
          done = log_vprintf_internal (&lpstate, fmt, args);
          va_end (args);
        }
      while (!done);
    }
}