File: Logging.qml

package info (click to toggle)
kquickcharts 5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 880 kB
  • sloc: cpp: 6,146; sh: 48; makefile: 11
file content (27 lines) | stat: -rw-r--r-- 750 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl>
 *
 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
 */

import QtQuick 2.12

pragma Singleton;

QtObject {
    id: log

    property LoggingCategory generalCategory: LoggingCategory {
        name: "kf.quickcharts.general"
        defaultLogLevel: LoggingCategory.Warning
    }

    property LoggingCategory deprecatedCategory: LoggingCategory {
        name: "kf.quickcharts.deprecated"
        defaultLogLevel: LoggingCategory.Warning
    }

    function deprecated(item, entry, since, message) {
        console.warn(log.deprecatedCategory, "%1::%2 is deprecated (since %3): %4".arg(item).arg(entry).arg(since).arg(message))
    }
}