diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-12-22 22:32:51 +0100 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2009-12-22 22:32:51 +0100 |
commit | b61e3b21580afc6381a6c72618d51697c7ce9771 (patch) | |
tree | 2a88eb434a28d4064f7017fd1202f10e88f341f7 /openbsc/src/bs11_config.c | |
parent | 0f9141384bc338cdf8db805fbfe502aed622f816 (diff) |
Import the new logging architecture
This is the new logging architecture, including
* support for multiuple logging targets like stderr and vty
* log levels in addition to categories/subsystems
* filtering based on imsi, i.e. only see events for one subscriber
* dynamically change log level for each category for each vty
Diffstat (limited to 'openbsc/src/bs11_config.c')
-rw-r--r-- | openbsc/src/bs11_config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/bs11_config.c b/openbsc/src/bs11_config.c index 2a80a49ad..b2470a9fc 100644 --- a/openbsc/src/bs11_config.c +++ b/openbsc/src/bs11_config.c @@ -71,6 +71,8 @@ static const char *trx1_password = "1111111111"; static const u_int8_t too_fast[] = { 0x12, 0x80, 0x00, 0x00, 0x02, 0x02 }; +static struct debug_target *stderr_target; + /* dummy function to keep gsm_data.c happy */ struct counter *counter_alloc(const char *name) { @@ -759,7 +761,7 @@ static void handle_options(int argc, char **argv) serial_port = optarg; break; case 'b': - debug_parse_category_mask(optarg); + debug_parse_category_mask(stderr_target, optarg); break; case 's': fname_software = optarg; @@ -812,6 +814,10 @@ int main(int argc, char **argv) struct gsm_network *gsmnet; int rc; + debug_init(); + stderr_target = debug_target_create_stderr(); + debug_add_target(stderr_target); + debug_set_all_filter(stderr_target, 1); handle_options(argc, argv); gsmnet = gsm_network_init(1, 1, NULL); |