Holger Hans Peter Freyther | d4310b9 | 2010-08-04 04:56:01 +0800 | [diff] [blame] | 1 | /* cellmgr logging support code */ |
| 2 | /* |
| 3 | * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org> |
| 4 | * All Rights Reserved |
| 5 | * |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame] | 6 | * This program is free software: you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU Affero General Public License as published by |
| 8 | * the Free Software Foundation, either version 3 of the License, or |
Holger Hans Peter Freyther | d4310b9 | 2010-08-04 04:56:01 +0800 | [diff] [blame] | 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame] | 14 | * GNU Affero General Public License for more details. |
Holger Hans Peter Freyther | d4310b9 | 2010-08-04 04:56:01 +0800 | [diff] [blame] | 15 | * |
Holger Hans Peter Freyther | de56c22 | 2011-01-16 17:45:14 +0100 | [diff] [blame] | 16 | * You should have received a copy of the GNU Affero General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
Holger Hans Peter Freyther | d4310b9 | 2010-08-04 04:56:01 +0800 | [diff] [blame] | 18 | * |
| 19 | */ |
| 20 | |
| 21 | #include <cellmgr_debug.h> |
| 22 | |
| 23 | #include <osmocore/utils.h> |
| 24 | |
| 25 | /* default categories */ |
| 26 | static const struct log_info_cat default_categories[] = { |
| 27 | [DINP] = { |
| 28 | .name = "DINP", |
| 29 | .description = "A-bis Intput Subsystem", |
| 30 | .enabled = 1, .loglevel = LOGL_NOTICE, |
| 31 | }, |
| 32 | [DSCCP] = { |
| 33 | .name = "DSCCP", |
| 34 | .description = "SCCP Protocol", |
| 35 | .enabled = 1, .loglevel = LOGL_NOTICE, |
| 36 | }, |
| 37 | [DMSC] = { |
| 38 | .name = "DMSC", |
| 39 | .description = "Mobile Switching Center", |
| 40 | .enabled = 1, .loglevel = LOGL_NOTICE, |
| 41 | }, |
| 42 | [DMGCP] = { |
| 43 | .name = "DMGCP", |
| 44 | .description = "Media Gateway Control Protocol", |
| 45 | .enabled = 1, .loglevel = LOGL_NOTICE, |
| 46 | }, |
Holger Hans Peter Freyther | c21cfaa | 2010-12-10 03:53:28 +0100 | [diff] [blame] | 47 | [DISUP] = { |
| 48 | .name = "DISUP", |
| 49 | .description = "ISUP", |
| 50 | .enabled = 1, .loglevel = LOGL_NOTICE, |
| 51 | }, |
Holger Hans Peter Freyther | d4310b9 | 2010-08-04 04:56:01 +0800 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | static int filter_fn(const struct log_context *ctx, |
| 55 | struct log_target *tar) |
| 56 | { |
| 57 | return 0; |
| 58 | } |
| 59 | |
| 60 | const struct log_info log_info = { |
| 61 | .filter_fn = filter_fn, |
| 62 | .cat = default_categories, |
| 63 | .num_cat = ARRAY_SIZE(default_categories), |
| 64 | }; |
| 65 | |