blob: 08954f5f4f53cfae7a07e126fa849ca47e3dbc98 [file] [log] [blame]
Pau Espin Pedrol21d03d32019-07-22 12:05:52 +02001/*
2 * Copyright (C) 2018-2019 sysmocom - s.f.m.c. GmbH
3 * All Rights Reserved
4 *
5 * SPDX-License-Identifier: AGPL-3.0+
6 *
7 * Author: Pau Espin Pedrol <pespin@sysmocom.de>
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Affero General Public License for more details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * See the COPYING file in the main directory for details.
22 */
23
Pau Espin Pedrol5ea18172018-02-20 16:48:15 +010024#include <osmocom/core/logging.h>
25#include <osmocom/core/utils.h>
26#include "debug.h"
27
28/* default categories */
29static const struct log_info_cat default_categories[] = {
30 [DMAIN] = {
31 .name = "DMAIN",
32 .description = "Main generic category",
33 .color = NULL,
34 .enabled = 1, .loglevel = LOGL_NOTICE,
35 },
Pau Espin Pedrol9f2baf32019-12-19 21:03:03 +010036 [DTRXCLK] = {
37 .name = "DTRXCLK",
38 .description = "TRX Master Clock",
39 .color = NULL,
40 .enabled = 1, .loglevel = LOGL_NOTICE,
41 },
Pau Espin Pedrol441d82a2018-12-04 16:37:24 +010042 [DTRXCTRL] = {
43 .name = "DTRXCTRL",
44 .description = "TRX CTRL interface",
45 .color = "\033[1;33m",
46 .enabled = 1, .loglevel = LOGL_NOTICE,
47 },
Pau Espin Pedrol9f2baf32019-12-19 21:03:03 +010048 [DTRXDDL] = {
49 .name = "DTRXDDL",
50 .description = "TRX Data interface Downlink",
51 .color = NULL,
52 .enabled = 1, .loglevel = LOGL_NOTICE,
53 },
54 [DTRXDUL] = {
55 .name = "DTRXDUL",
56 .description = "TRX CTRL interface Uplink",
57 .color = NULL,
58 .enabled = 1, .loglevel = LOGL_NOTICE,
59 },
Harald Welte5cc88582018-08-17 19:55:38 +020060 [DDEV] = {
61 .name = "DDEV",
62 .description = "Device/Driver specific code",
63 .color = NULL,
Philipp Maier748d8ed2020-03-25 12:35:07 +010064 .enabled = 1, .loglevel = LOGL_NOTICE,
Harald Welte5cc88582018-08-17 19:55:38 +020065 },
Pau Espin Pedrolaebbfe02020-01-02 16:39:11 +010066 [DDEVDRV] = {
67 .name = "DDEVDRV",
68 .description = "Logging from external device driver library implementing lower level specifics",
Pau Espin Pedrolc7a0bf12018-04-25 12:17:10 +020069 .color = NULL,
70 .enabled = 1, .loglevel = LOGL_NOTICE,
71 },
Pau Espin Pedrol761da1a2020-07-17 18:29:20 +020072 [DCTR] = {
73 .name = "DCTR",
74 .description = "Rate counter related logging",
75 .color = NULL,
76 .enabled = 1, .loglevel = LOGL_NOTICE,
77 },
Pau Espin Pedrol5ea18172018-02-20 16:48:15 +010078};
79
80const struct log_info log_info = {
81 .cat = default_categories,
82 .num_cat = ARRAY_SIZE(default_categories),
83};