Harald Welte | a67be5f | 2020-09-03 10:04:36 +0200 | [diff] [blame] | 1 | /* libosmocore logging integration |
| 2 | * |
| 3 | * (C) 2019-2020 by Harald Welte <laforge@gnumonks.org> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
| 18 | */ |
| 19 | |
| 20 | |
Harald Welte | 0634836 | 2019-05-19 00:45:17 +0200 | [diff] [blame] | 21 | #include <osmocom/core/utils.h> |
| 22 | #include <osmocom/core/logging.h> |
| 23 | #include "logging.h" |
| 24 | |
| 25 | static const struct log_info_cat log_info_cat[] = { |
| 26 | [DUSB] = { |
| 27 | .name = "USB", |
| 28 | .description = "USB Transport", |
| 29 | .enabled = 1, |
| 30 | .loglevel = LOGL_NOTICE, |
| 31 | }, |
| 32 | [DCCID] = { |
| 33 | .name = "CCID", |
| 34 | .description = "USB-CCID Protocol", |
| 35 | .enabled = 1, |
| 36 | .loglevel = LOGL_DEBUG, |
| 37 | }, |
| 38 | [DISO7816] = { |
| 39 | .name = "ISO7816", |
| 40 | .description = "ISO7816-3 State machines", |
| 41 | .enabled = 1, |
| 42 | .loglevel = LOGL_DEBUG, |
| 43 | }, |
| 44 | [DATR] = { |
| 45 | .name = "ATR", |
| 46 | .description = "ATR (Answer To Reset) FSM", |
| 47 | .enabled = 1, |
| 48 | .loglevel = LOGL_DEBUG, |
| 49 | }, |
| 50 | [DTPDU] = { |
| 51 | .name = "TPDU", |
| 52 | .description = "TPDU FSM", |
| 53 | .enabled = 1, |
| 54 | .loglevel = LOGL_DEBUG, |
| 55 | }, |
| 56 | [DPPS] = { |
| 57 | .name = "PPS", |
| 58 | .description = "PPS (Protocol and Parameter Selection) FSM", |
| 59 | .enabled = 1, |
| 60 | .loglevel = LOGL_DEBUG, |
| 61 | }, |
| 62 | }; |
| 63 | |
| 64 | const struct log_info log_info = { |
| 65 | .cat = log_info_cat, |
| 66 | .num_cat = ARRAY_SIZE(log_info_cat), |
| 67 | }; |