~ubuntu-branches/ubuntu/raring/ceph/raring

« back to all changes in this revision

Viewing changes to src/leveldb/util/logging.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-06-08 15:54:37 UTC
  • mfrom: (1.1.8) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20120608155437-gy3j9k6wzv7w4gn9
Tags: 0.44.1-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - d/control: Switch from libcryptopp to libnss as libcryptopp
    is not seeded.
  - d/control,d/rules: Move from python-support to dh_python2.
  - d/patches/manpage_updates*.patch: cherry picked upstream manpage
    updates warning about lack of encryption, per MIR review.
  - d/rules,d/control: Drop radosgw since libfcgi is not in main and
    the code may not be suitable for LTS.
  - d/rules,d/control: Drop tcmalloc since google perftools is not
    in main yet.
  - d/rules,d/control: Drop ceph-fuse entirely per MIR review
    recommendation.
* d/patches/fix-radosgw-tests.patch: Cherry picked patch from upstream
  VCS to fixup tests to conditionally use radosgw if enabled.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
 
2
// Use of this source code is governed by a BSD-style license that can be
 
3
// found in the LICENSE file. See the AUTHORS file for names of contributors.
 
4
//
 
5
// Must not be included from any .h files to avoid polluting the namespace
 
6
// with macros.
 
7
 
 
8
#ifndef STORAGE_LEVELDB_UTIL_LOGGING_H_
 
9
#define STORAGE_LEVELDB_UTIL_LOGGING_H_
 
10
 
 
11
#include <stdio.h>
 
12
#include <stdint.h>
 
13
#include <string>
 
14
#include "port/port.h"
 
15
 
 
16
namespace leveldb {
 
17
 
 
18
class Slice;
 
19
class WritableFile;
 
20
 
 
21
// Append a human-readable printout of "num" to *str
 
22
extern void AppendNumberTo(std::string* str, uint64_t num);
 
23
 
 
24
// Append a human-readable printout of "value" to *str.
 
25
// Escapes any non-printable characters found in "value".
 
26
extern void AppendEscapedStringTo(std::string* str, const Slice& value);
 
27
 
 
28
// Return a human-readable printout of "num"
 
29
extern std::string NumberToString(uint64_t num);
 
30
 
 
31
// Return a human-readable version of "value".
 
32
// Escapes any non-printable characters found in "value".
 
33
extern std::string EscapeString(const Slice& value);
 
34
 
 
35
// If *in starts with "c", advances *in past the first character and
 
36
// returns true.  Otherwise, returns false.
 
37
extern bool ConsumeChar(Slice* in, char c);
 
38
 
 
39
// Parse a human-readable number from "*in" into *value.  On success,
 
40
// advances "*in" past the consumed number and sets "*val" to the
 
41
// numeric value.  Otherwise, returns false and leaves *in in an
 
42
// unspecified state.
 
43
extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val);
 
44
 
 
45
}  // namespace leveldb
 
46
 
 
47
#endif  // STORAGE_LEVELDB_UTIL_LOGGING_H_