~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/common/LogEntry.cc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
 
2
#include <syslog.h>
 
3
 
2
4
#include "LogEntry.h"
3
5
#include "Formatter.h"
4
6
 
 
7
 
 
8
int clog_type_to_syslog_prio(clog_type t)
 
9
{
 
10
  switch (t) {
 
11
    case CLOG_DEBUG:
 
12
      return LOG_DEBUG;
 
13
    case CLOG_INFO:
 
14
      return LOG_INFO;
 
15
    case CLOG_WARN:
 
16
      return LOG_WARNING;
 
17
    case CLOG_ERROR:
 
18
      return LOG_ERR;
 
19
    case CLOG_SEC:
 
20
      return LOG_CRIT;
 
21
    default:
 
22
      assert(0);
 
23
      return 0;
 
24
  }
 
25
}
 
26
 
 
27
// ----
 
28
// LogEntryKey
 
29
 
5
30
void LogEntryKey::encode(bufferlist& bl) const
6
31
{
7
32
  ::encode(who, bl);