~ubuntu-branches/ubuntu/utopic/mongodb/utopic

« back to all changes in this revision

Viewing changes to src/mongo/logger/log_severity-inl.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-07-03 09:23:46 UTC
  • mfrom: (1.3.10) (44.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140703092346-c5bvt46wnzougyly
Tags: 1:2.6.3-0ubuntu1
* New upstream stable release:
  - Dropped patches, included upstream:
    + 0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch
    + 0008-Use-system-libstemmer.patch
    + 0011-Use-a-signed-char-to-store-BSONType-enumerations.patch
    + 0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch
    + 0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch
  - d/p/*: Refreshed/rebased remaining patches.
  - Use system provided libyaml-cpp:
    + d/control: Add libyaml-cpp-dev to BD's.
    + d/rules: Enable --with-system-yaml option.
    + d/p/fix-yaml-detection.patch: Fix detection of libyaml-cpp library.
  - d/mongodb-server.mongodb.upstart: Sync changes from upstream.
  - d/control,mongodb-dev.*: Drop mongodb-dev package; it has no reverse
    dependencies and upstream no longer install header files.
  - d/NEWS: Point users to upstream upgrade documentation for upgrades
    from 2.4 to 2.6.
* Merge from Debian unstable.
* d/control: BD on libv8-3.14-dev to ensure that transitioning to new v8
  versions is a explicit action due to changes in behaviour in >= 3.25
  (LP: #1295723).
* d/mongodb-server.prerm: Dropped debug echo call from maintainer script
  (LP: #1294455).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*    Copyright 2013 10gen Inc.
 
2
 *
 
3
 *    Licensed under the Apache License, Version 2.0 (the "License");
 
4
 *    you may not use this file except in compliance with the License.
 
5
 *    You may obtain a copy of the License at
 
6
 *
 
7
 *    http://www.apache.org/licenses/LICENSE-2.0
 
8
 *
 
9
 *    Unless required by applicable law or agreed to in writing, software
 
10
 *    distributed under the License is distributed on an "AS IS" BASIS,
 
11
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
12
 *    See the License for the specific language governing permissions and
 
13
 *    limitations under the License.
 
14
 */
 
15
 
 
16
#pragma once
 
17
 
 
18
namespace mongo {
 
19
namespace logger {
 
20
 
 
21
    LogSeverity LogSeverity::Severe() { return LogSeverity(-4); }
 
22
    LogSeverity LogSeverity::Error() { return LogSeverity(-3); }
 
23
    LogSeverity LogSeverity::Warning() { return LogSeverity(-2); }
 
24
    LogSeverity LogSeverity::Info() { return LogSeverity(-1); }
 
25
    LogSeverity LogSeverity::Log() { return LogSeverity(0); }
 
26
    LogSeverity LogSeverity::Debug(int debugLevel) { return LogSeverity(debugLevel); }
 
27
 
 
28
    LogSeverity LogSeverity::cast(int ll) { return LogSeverity(ll); }
 
29
 
 
30
    int LogSeverity::toInt() const { return _severity; }
 
31
    LogSeverity LogSeverity::moreSevere() const { return LogSeverity(_severity - 1); }
 
32
    LogSeverity LogSeverity::lessSevere() const { return LogSeverity(_severity + 1); }
 
33
 
 
34
    bool LogSeverity::operator==(LogSeverity other) const { return _severity == other._severity; }
 
35
    bool LogSeverity::operator!=(LogSeverity other) const { return _severity != other._severity; }
 
36
    bool LogSeverity::operator<(LogSeverity other) const { return _severity > other._severity; }
 
37
    bool LogSeverity::operator<=(LogSeverity other) const { return _severity >= other._severity; }
 
38
    bool LogSeverity::operator>(LogSeverity other) const { return _severity < other._severity; }
 
39
    bool LogSeverity::operator>=(LogSeverity other) const { return _severity <= other._severity; }
 
40
 
 
41
}  // namespace logger
 
42
}  // namespace mongo