~ubuntu-branches/ubuntu/trusty/haproxy/trusty-updates

« back to all changes in this revision

Viewing changes to src/log.c

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-10-19 22:31:45 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20091019223145-rymupk5njs544bvp
ImportĀ upstreamĀ versionĀ 1.3.22

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <sys/time.h>
24
24
 
25
25
#include <common/config.h>
 
26
#include <common/compat.h>
26
27
#include <common/standard.h>
27
28
#include <common/time.h>
28
29
 
30
31
 
31
32
#include <proto/log.h>
32
33
 
33
 
#ifndef MSG_NOSIGNAL
34
 
#define MSG_NOSIGNAL    (0)
35
 
#endif /* !MSG_NOSIGNAL */
36
 
 
37
34
const char *log_facilities[NB_LOG_FACILITIES] = {
38
35
        "kern", "user", "mail", "daemon",
39
36
        "auth", "syslog", "lpr", "news",
345
342
 
346
343
        get_localtime(s->logs.tv_accept.tv_sec, &tm);
347
344
 
348
 
        if (fe->logfac1 >= 0)
349
 
                prx_log = fe;
350
 
        /*
351
 
         * FIXME: should we fall back to the backend if the frontend did not
352
 
         * define any log ? It seems like we should not permit such complex
353
 
         * setups because they would induce a debugging nightmare for the
354
 
         * admin.
355
 
         */
356
 
        // else if (be->logfac1 >= 0)
357
 
        // prx_log = be;
358
 
        else
359
 
                prx_log = NULL; /* global */
 
345
        if (fe->logfac1 < 0 && fe->logfac2 < 0)
 
346
                return;
360
347
 
361
 
        /* FIXME: let's limit ourselves to frontend logging for now. */
 
348
        prx_log = fe;
362
349
        tolog = fe->to_log;
363
350
        svid = (tolog & LW_SVID) ? (s->srv != NULL) ? s->srv->id : "<NOSRV>" : "-";
364
351