~raghavendra-prabhu/percona-xtradb-cluster/release-5.5.30-galera-2.x

« back to all changes in this revision

Viewing changes to garb/garb_logger.cpp

  • Committer: Raghavendra D Prabhu
  • Date: 2013-04-12 15:26:34 UTC
  • mfrom: (95.2.24 2.x)
  • Revision ID: raghavendra.prabhu@percona.com-20130412152634-2y2u0swshf5fie2x
Merge lp:galera-2.x upto revision 150.

Following bugs are fixed:

lp:1166065
lp:1164992

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
namespace garb
10
10
{
11
 
    void set_logfile (const std::string& fname) throw (gu::Exception)
 
11
    void set_logfile (const std::string& fname)
12
12
    {
13
13
        FILE* log_file = fopen (fname.c_str(), "a");
14
14
 
21
21
        gu_conf_set_log_file (log_file);
22
22
    }
23
23
 
24
 
    static void log_to_syslog (int level, const char* msg) throw()
 
24
    static void log_to_syslog (int level, const char* msg)
25
25
    {
26
26
        int p = LOG_NOTICE;
27
27
 
37
37
        syslog (p | LOG_DAEMON, "%s", msg);
38
38
    }
39
39
 
40
 
    void set_syslog () throw ()
 
40
    void set_syslog ()
41
41
    {
42
42
        openlog ("garbd", LOG_PID, LOG_DAEMON);
43
43
        gu_conf_set_log_callback (log_to_syslog);