OpenVDB  0.104.0
logging.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2012 DreamWorks Animation LLC
4 //
5 // All rights reserved. This software is distributed under the
6 // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
7 //
8 // Redistributions of source code must retain the above copyright
9 // and license notice and the following restrictions and disclaimer.
10 //
11 // * Neither the name of DreamWorks Animation nor the names of
12 // its contributors may be used to endorse or promote products derived
13 // from this software without specific prior written permission.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
20 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 // IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
27 // LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
28 //
30 
31 #ifndef OPENVDB_UTIL_LOGGING_HAS_BEEN_INCLUDED
32 #define OPENVDB_UTIL_LOGGING_HAS_BEEN_INCLUDED
33 
34 #ifndef OPENVDB_USE_LOG4CPLUS
35 
38 #define OPENVDB_LOG_INFO(message)
39 #define OPENVDB_LOG_WARN(message) do { std::cerr << message << std::endl; } while (0);
40 #define OPENVDB_LOG_ERROR(message) do { std::cerr << message << std::endl; } while (0);
41 #define OPENVDB_LOG_FATAL(message) do { std::cerr << message << std::endl; } while (0);
42 #define OPENVDB_LOG_DEBUG(message)
43 #define OPENVDB_LOG_DEBUG_RUNTIME(message)
44 
45 #else // ifdef OPENVDB_USE_LOG4CPLUS
46 
47 #include <logging_base/logging.h>
48 
49 #define OPENVDB_LOG_INFO(message) LOG_INFO(message)
50 #define OPENVDB_LOG_WARN(message) LOG_WARN(message)
51 #define OPENVDB_LOG_ERROR(message) LOG_ERROR(message)
52 #define OPENVDB_LOG_FATAL(message) LOG_FATAL(message)
53 #ifdef DEBUG
54 
55 #define OPENVDB_LOG_DEBUG(message) LOG_DEBUG(message)
56 #else
57 #define OPENVDB_LOG_DEBUG(message)
58 #endif
59 
60 
61 #define OPENVDB_LOG_DEBUG_RUNTIME(message) LOG_DEBUG_RUNTIME(message)
62 
63 #endif // OPENVDB_USE_LOG4CPLUS
64 
65 #endif // OPENVDB_UTIL_LOGGING_HAS_BEEN_INCLUDED
66 
67 // Copyright (c) 2012 DreamWorks Animation LLC
68 // All rights reserved. This software is distributed under the
69 // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )