1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __FRAMEWORK_MACROS_DEBUG_HXX_
21 #define __FRAMEWORK_MACROS_DEBUG_HXX_
23 //*****************************************************************************************************************
24 // Disable all feature of this file in produkt version!
25 // But enable normal assertion handling (as messagebox) in normal debug version.
26 // User can overwrite these adjustment with his own values! We will do it only if nothing is set.
27 //*****************************************************************************************************************
29 //-----------------------------------------------------------------------------------------------------------------
30 // => "personal debug code"
31 #if OSL_DEBUG_LEVEL > 1
33 // Enable log mechanism for normal assertion and error handling.
34 // Look for user decisions before!
35 #ifndef ENABLE_LOGMECHANISM
36 #define ENABLE_LOGMECHANISM
38 // Enable assertion handling himself AND additional warnings.
39 // The default logtype is MESSAGEBOX.
40 // see "assertion.hxx" for further information
41 #ifndef ENABLE_ASSERTIONS
42 #define ENABLE_ASSERTIONS
44 #ifndef ENABLE_WARNINGS
45 #define ENABLE_WARNINGS
48 //-----------------------------------------------------------------------------------------------------------------
50 #elif OSL_DEBUG_LEVEL > 0
52 // Enable log mechanism for normal assertion and error handling.
53 // Look for user decisions before!
54 #ifndef ENABLE_LOGMECHANISM
55 #define ENABLE_LOGMECHANISM
57 // Enable assertion handling himself.
58 // The default logtype is MESSAGEBOX.
59 // see "assertion.hxx" for further information
60 #ifndef ENABLE_ASSERTIONS
61 #define ENABLE_ASSERTIONS
64 //-----------------------------------------------------------------------------------------------------------------
65 // => "product" (OSL_DEBUG_LEVEL == 0)
68 #undef ENABLE_LOGMECHANISM
69 #undef ENABLE_ASSERTIONS
70 #undef ENABLE_WARNINGS
71 #undef ENABLE_EVENTDEBUG
72 #undef ENABLE_REGISTRATIONDEBUG
73 // #undef ENABLE_TIMEMEASURE
74 #undef ENABLE_MEMORYMEASURE
75 #undef ENABLE_FILTERDBG
79 //*****************************************************************************************************************
80 // generic macros for logging
81 //*****************************************************************************************************************
83 #include <macros/debug/logmechanism.hxx>
85 //*****************************************************************************************************************
86 // special macros for assertion handling
87 //*****************************************************************************************************************
88 #include <macros/debug/assertion.hxx>
90 //*****************************************************************************************************************
91 // special macros for event handling
92 //*****************************************************************************************************************
93 #include <macros/debug/event.hxx>
95 //*****************************************************************************************************************
96 // special macros to debug service registration
97 //*****************************************************************************************************************
98 #include <macros/debug/registration.hxx>
100 //*****************************************************************************************************************
101 // special macros to debug our filter cache!
102 //*****************************************************************************************************************
103 #include <macros/debug/filterdbg.hxx>
105 #endif // #ifndef __FRAMEWORK_MACROS_DEBUG_HXX_
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */