-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_qstring_support
- Loading branch information
Showing
27 changed files
with
232 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#include "com/foo/config-qt.h" | ||
#include "com/foo/bar.h" | ||
#include "com/foo/config-qt.h" | ||
|
||
using namespace com::foo; | ||
|
||
LoggerPtr Bar::m_logger(getLogger("com.foo.bar")); | ||
|
||
void Bar::doIt() { | ||
LOG4CXX_DEBUG(m_logger, QString("Did it again!")); | ||
LOG4CXX_DEBUG(m_logger, QString("Did it again!") << QString(" - again!")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef _LOG4CXX_QT_LOGGER_H | ||
#define _LOG4CXX_QT_LOGGER_H | ||
#include <log4cxx/logger.h> | ||
#include <log4cxx-qt/messagebuffer.h> | ||
#endif // _LOG4CXX_QT_LOGGER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef _LOG4CXX_QT_MESSAGE_BUFFER_H | ||
#define _LOG4CXX_QT_MESSAGE_BUFFER_H | ||
#include <log4cxx-qt/transcoder.h> | ||
|
||
#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR | ||
inline log4cxx::helpers::UniCharMessageBuffer& | ||
operator<<(log4cxx::helpers::UniCharMessageBuffer& mb, const QString& msg) | ||
{ | ||
return mb << msg.utf16(); | ||
} | ||
|
||
#if LOG4CXX_WCHAR_T_API | ||
inline log4cxx::helpers::WideMessageBuffer& | ||
operator<<(log4cxx::helpers::WideMessageBuffer& mb, const QString& msg) | ||
{ | ||
return mb << msg.toStdWString(); | ||
} | ||
|
||
inline log4cxx::helpers::WideMessageBuffer& | ||
operator<<(log4cxx::helpers::MessageBuffer& mb, const QString& msg) | ||
{ | ||
return mb << msg.toStdWString(); | ||
} | ||
#else // !LOG4CXX_WCHAR_T_API | ||
inline log4cxx::helpers::UniCharMessageBuffer& | ||
operator<<(log4cxx::helpers::MessageBuffer& mb, const QString& msg) | ||
{ | ||
return mb << msg.utf16(); | ||
} | ||
#endif // !LOG4CXX_WCHAR_T_API | ||
|
||
#else // !(LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR) | ||
|
||
#if LOG4CXX_WCHAR_T_API | ||
inline log4cxx::helpers::WideMessageBuffer& | ||
operator<<(log4cxx::helpers::WideMessageBuffer& mb, const QString& msg) | ||
{ | ||
return mb << msg.toStdWString(); | ||
} | ||
|
||
inline log4cxx::helpers::WideMessageBuffer& | ||
operator<<(log4cxx::helpers::MessageBuffer& mb, const QString& msg) | ||
{ | ||
return mb << msg.toStdWString(); | ||
} | ||
#else // !LOG4CXX_WCHAR_T_API | ||
inline log4cxx::helpers::CharMessageBuffer& | ||
operator<<(log4cxx::helpers::CharMessageBuffer& mb, const QString& msg) | ||
{ | ||
LOG4CXX_DECODE_QSTRING(tmp, msg); | ||
return mb << tmp; | ||
} | ||
#endif // !LOG4CXX_WCHAR_T_API | ||
|
||
#endif // !(LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR) | ||
|
||
#endif // _LOG4CXX_QT_MESSAGE_BUFFER_H |
Oops, something went wrong.