00001 /****************************************************************************** 00002 * 00003 * package: Log4Qt 00004 * file: logging.h 00005 * created: September 2007 00006 * author: Martin Heinrich 00007 * 00008 * 00009 * changes: Sep 2008, Martin Heinrich: 00010 * - Added a compile time version check for the Qt version 00011 * Jan 2009, Martin Heinrich: 00012 * - Updated documentation and version information for version 0.2 00013 * Feb 2009, Martin Heinrich: 00014 * - Updated version information for version 0.3 00015 * 00016 * 00017 * Copyright 2007 - 2009 Martin Heinrich 00018 * 00019 * Licensed under the Apache License, Version 2.0 (the "License"); 00020 * you may not use this file except in compliance with the License. 00021 * You may obtain a copy of the License at 00022 * 00023 * http://www.apache.org/licenses/LICENSE-2.0 00024 * 00025 * Unless required by applicable law or agreed to in writing, software 00026 * distributed under the License is distributed on an "AS IS" BASIS, 00027 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00028 * See the License for the specific language governing permissions and 00029 * limitations under the License. 00030 * 00031 ******************************************************************************/ 00032 00033 #ifndef LOG4QT_H 00034 #define LOG4QT_H 00035 00036 00522 /****************************************************************************** 00523 * Dependencies 00524 ******************************************************************************/ 00525 00526 #include <QtCore/qglobal.h> 00527 00528 #if QT_VERSION < QT_VERSION_CHECK(4, 3, 0) 00529 # error "Log4Qt requires Qt version 4.3.0 or higher" 00530 #endif 00531 00532 00533 /****************************************************************************** 00534 * Declarations 00535 ******************************************************************************/ 00536 00540 namespace Log4Qt 00541 { 00550 #define LOG4QT_VERSION 0x000200 00551 00559 #define LOG4QT_VERSION_STR "0.3.0" 00560 00561 enum ErrorCode 00562 { 00563 OK = 0, 00564 // AppenderSkeleton, FileAppender, WriterAppender 00565 APPENDER_ACTIVATE_MISSING_LAYOUT_ERROR, 00566 APPENDER_ACTIVATE_MISSING_WRITER_ERROR, 00567 APPENDER_ACTIVATE_MISSING_FILE_ERROR, 00568 APPENDER_CLOSED_ERROR, 00569 APPENDER_INVALID_PATTERN_ERROR, 00570 APPENDER_NO_OPEN_FILE_ERROR, 00571 APPENDER_NOT_ACTIVATED_ERROR, 00572 APPENDER_OPENING_FILE_ERROR, 00573 APPENDER_RENAMING_FILE_ERROR, 00574 APPENDER_REMOVE_FILE_ERROR, 00575 APPENDER_USE_INVALID_PATTERN_ERROR, 00576 APPENDER_USE_MISSING_LAYOUT_ERROR, 00577 APPENDER_USE_MISSING_WRITER_ERROR, 00578 APPENDER_WRITING_FILE_ERROR, 00579 // Level 00580 LEVEL_INVALID_LEVEL_STRING, 00581 // Layouts, PatternFormatter 00582 LAYOUT_EXPECTED_DIGIT_ERROR, 00583 LAYOUT_OPTION_IS_NOT_INTEGER_ERROR, 00584 LAYOUT_INTEGER_IS_NOT_POSITIVE_ERROR, 00585 // Logger 00586 LOGGER_INVALID_LEVEL_FOR_ROOT, 00587 // PropertyConfigurator, OptionHandler 00588 CONFIGURATOR_OPENING_FILE_ERROR, 00589 CONFIGURATOR_READING_FILE_ERROR, 00590 CONFIGURATOR_INVALID_SUBSTITUTION_ERROR, 00591 CONFIGURATOR_INVALID_OPTION_ERROR, 00592 CONFIGURATOR_MISSING_APPENDER_ERROR, 00593 CONFIGURATOR_UNKNOWN_APPENDER_CLASS_ERROR, 00594 CONFIGURATOR_MISSING_LAYOUT_ERROR, 00595 CONFIGURATOR_UNKNOWN_LAYOUT_CLASS_ERROR, 00596 CONFIGURATOR_PROPERTY_ERROR, 00597 CONFIGURATOR_UNKNOWN_TYPE_ERROR 00598 }; 00599 00600 00601 /****************************************************************************** 00602 * Operators, Helpers 00603 ******************************************************************************/ 00604 00605 00606 /****************************************************************************** 00607 * Inline 00608 ******************************************************************************/ 00609 00610 00611 } // namespace Log4Qt 00612 00613 00614 #endif // LOG4QT_H