libosmovty 1.13.1.1-afb4 Osmocom VTY library

Macros | Functions
logging.h File Reference

Go to the source code of this file.

## Macros
#define | LOGGING_STR "Configure logging\n"
#define | FILTER_STR "Filter log messages\n"

## Functions
void | logging_vty_add_cmds ()
| Register logging related commands to the VTY. More...
void | logging_vty_add_deprecated_subsys (void *ctx, const char *name)
struct log_target * | osmo_log_vty2tgt (struct vty *vty)
| Get log target associated to VTY console. More...

## Macro Definition Documentation

## ◆ FILTER_STR

#define FILTER_STR "Filter log messages\n"

## ◆ LOGGING_STR

#define LOGGING_STR "Configure logging\n"

## Function Documentation

## ◆ logging_vty_add_cmds()

void logging_vty_add_cmds | ( | void |  | ) |

Register logging related commands to the VTY.

Call this once from your application if you want to support those commands.

References CFG_LOG_NODE, cfg_log_node, CONFIG_NODE, config_write_log(), EVERYTHING_STR, gen_logging_level_cmd_strs(), gen_vty_logp_cmd_strs(), install_lib_element(), install_lib_element_ve(), install_node(), LOG_LEVEL_ARGS, and LOG_LEVEL_STRS.

## ◆ logging_vty_add_deprecated_subsys()

void logging_vty_add_deprecated_subsys | ( | void * | ctx,
|  | const char * | name
| ) |  |

References cmd_element::attr, CFG_LOG_NODE, CMD_ATTR_DEPRECATED, cmd_element::doc, cmd_element::func, install_lib_element(), LEVEL_STR, log_deprecated_func(), LOG_LEVEL_ARGS, name, OSMO_ASSERT, and cmd_element::string.

## ◆ osmo_log_vty2tgt()

struct log_target * osmo_log_vty2tgt | ( | struct vty * | vty | ) |

Get log target associated to VTY console.

Parameters

  [in] | vty | Log target type

Returns
  Log target (if logging enabled), NULL otherwise Must be called with mutex osmo_log_tgt_mutex held, see log_tgt_mutex_lock.

References CFG_LOG_NODE, telnet_connection::dbg, if(), vty::index, vty::node, vty::priv, VTY_NEWLINE, and vty_out().