Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the debug output to use logging categories. It also provides a new DEVELOPMENT_BUILD define that exposes potentially more sensitive logging info such as URLs only when it's set.
- Loading branch information
Showing
18 changed files
with
187 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- | ||
* | ||
* Copyright (c) 2013 - 2019 Jolla Ltd. | ||
* Copyright (c) 2019 Open Mobile Platform LLC. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef QMOZ_EMBED_LOG_H | ||
#define QMOZ_EMBED_LOG_H | ||
|
||
#include <stdio.h> | ||
#include <QDebug> | ||
#include <QLoggingCategory> | ||
|
||
#ifdef Q_DEBUG_LOG | ||
//#define DEVELOPMENT_BUILD (1) | ||
|
||
#ifdef LOG_COMPONENT | ||
#define LOGT(FMT, ...) fprintf(stderr, \ | ||
"EmbedLiteExt %s:%s:%d: " FMT "\n", LOG_COMPONENT, __FUNCTION__, __LINE__, ##__VA_ARGS__) | ||
#else // LOG_COMPONENT | ||
#define LOGT(FMT, ...) fprintf(stderr, \ | ||
"EmbedLiteExt %s:%d: " FMT "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) | ||
#endif // LOG_COMPONENT | ||
|
||
#else // Q_DEBUG_LOG | ||
|
||
#define LOGT(...) do {} while (0) | ||
|
||
#endif // Q_DEBUG_LOG | ||
Q_DECLARE_LOGGING_CATEGORY(lcEmbedLiteExt) | ||
|
||
#endif // QMOZ_EMBED_LOG_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
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
Oops, something went wrong.