aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/logging_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-20vty: Fix writing the logging of categoryMichael McTernan1-1/+1
Fix copy and paste issue introduced by Holger in 2d6ad13d8daf860595e6d4025861e122ce574871.
2015-01-27vty: Fix typo in the state creationHolger Hans Peter Freyther1-1/+1
This got introduced in 2d6ad13d8daf860595e6d4025861e122ce574871 and I thought that our vty tests would have caught such mistakes.
2014-12-05logging: Make it possible to print category/subsys and timestampsHolger Hans Peter Freyther1-3/+46
We want to see from which category/subsystem a certain log message is coming from and use a different timestamp format as well. Add two new bitfields. This doesn't change the size of the structure and on 32bit we still have 27bits left. The extended timestamp will take preference over the current and default timestamp format. Fixes: SYS#602
2014-08-25logging: Add ability to save/print current log filtersHarald Welte1-2/+6
This enables the persistent configuration of let's say 'log filter imsi 012345678' for a given log file in the config file.
2013-09-08vty: Add vty_install_default() and use for the vty nodesJacob Erlbeck1-2/+1
This adds the vty_install_default() function that is basically the install_default() function plus the registration of the commands 'exit' and 'end'. The latter is only provided in subnodes of ENABLED_NODE and CONFIG_NONE. The VTY test program is extended to check these commands. Ticket: OW#952
2013-07-14vty: Fix logically dead code in the description handlingHolger Hans Peter Freyther1-1/+1
The code most likely wanted to check the result of argv_concat. To do this we need to dereference the dptr. Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement "return 1; Fixes: Coverity CID 1040675
2013-03-19logging_vty: Fix segfault un unused entries in log_info_cat array of appHarald Welte1-0/+4
2013-03-13logging_vty: Print 'log filter all' info in 'show logging vty'Harald Welte1-0/+6
When we print information about the current logging configuration, it makes sense to also print information about the log filters.
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi1-4/+81
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
2013-02-27Revert "Added a ring buffer log target to store the last N log messages."Holger Hans Peter Freyther1-81/+4
I noticed some more issues and it is the easiest to revert and include the fixed version. This reverts commit 73377229bb33ab79682ce4b126a63602d13304ad.
2013-02-27Added a ring buffer log target to store the last N log messages.Katerina Barone-Adesi1-4/+81
The log target can be used via log alarms and show alarms. Why? This feature was proposed/requested at http://openbsc.osmocom.org/trac/wiki/Tasks/ErrorLogTarget All messages use the same amount of space, prioritizing simplicity.
2012-10-22logging: Make sure to install standard "end" command in VTY nodeHarald Welte1-0/+2
When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config.
2012-10-22logging: Don't forget to save "logging filter all 1"Harald Welte1-0/+4
Prior to this fix, a persistent file or syslog log configuration didn't work across an application re-start, as the "logging filter all 1" was never saved and thus no messages were logged.
2012-07-25vty: Document the .TEXT of the descriptionHolger Hans Peter Freyther1-1/+2
2011-10-03vty: Provide documentation for all logging facilitiesHolger Hans Peter Freyther1-1/+10
Document all facilities in the log syslog command.
2011-10-03vty: Provide logging set-log-mask, deprecate set log maskHolger Hans Peter Freyther1-2/+12
There are no other commands on the set, log and mask level, create a simple set-log-mask command and deprecate the old way.
2011-03-29vty: Fix a memory leak in the vty description commandHolger Hans Peter Freyther1-0/+2
Before assigning a new string, free the previous one. This assume that it was allocated with talloc which should be true for the osmocom users.
2011-03-23include: reorganize headers file to include/osmocom/[gsm|core]0.2.0Pablo Neira Ayuso1-3/+3
This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-19vty: integration with logging framework0.1.31Pablo Neira Ayuso1-49/+7
The logging categories are registered by the applications, like osmo-nitb, during startup. Thus, the VTY have to provide the logging commands according to the logging categories that the application has registered. Before this patch, the VTY contained the logging categories hardcoded. Thus, any change in the logging categories by the application would not be shown by the VTY. So far, this was not a problem because all applications used the same logging categories. However, according to what Harald told me, this may be a problem in the future. This patch resolve the lack of integration between the logging framework and the VTY by generating the VTY logging commands from the logging categories registered. Since this patch changes one function of the libosmocore API, it follows another patch for the openbsc application to get in sync with the new function layout. I have reworked and renamed the functions: * log_vty_category_string() * log_vty_level_string() to provide the new ones that generate the exact output that VTY requires. This patch does not release the memory allocated by talloc_zero_size() to store the VTY strings for the commands and the description. I found no exit function that can clean up resources that were allocated.
2011-02-24LOGGING: Use host.app_info->name instead of FIXMEHarald Welte1-1/+4
This should put a useful syslog identity in place.
2011-02-18LOGGING: remove duplicated code between vty-logging and cfg-loggingHarald Welte1-123/+60
2011-02-18LOGGING: Add missing 'nat' subsystemHarald Welte1-1/+2
2011-02-18LOGGING: configure logging from the vtyHarald Welte1-22/+355
We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
2011-02-17LOGGING: Pass the log level down to the log target output functionHarald Welte1-1/+2
This will be required for mapping osmocore log levels to syslog priorities.
2011-01-22logging: Add isup,m2ua,pcap from the cellmgr.Holger Hans Peter Freyther1-1/+4
This is something that we should generate dynamically from the log_info as well. This is adding bits from the cellmgr_ng.
2010-05-25rename log_info to osmo_log_info to avoid namespace clash with appHarald Welte1-2/+2
2010-05-25Create libosmovty as library from OpenBSC VTY functionsHarald Welte1-0/+347