File src/cmd_log.c

Displays the system logfiles in a friendly format. Also can list information about known logfiles.


Included Files


Global Variable PROCNAME

char PROCNAME[128]
Included from include/ubs.h

Global Variable CUR_TIME

struct tm* CUR_TIME
Included from include/ubs.h

Global Variable GLOBAL

ubs_table GLOBAL
Included from include/ubs.h

Global Variable LOGLEVEL

int LOGLEVEL
Included from include/ubs.h

Global Function cmd_log()

Displays information about logfiles

int cmd_log ( int cmdc, char** cmdv )

int cmd_log
Returns OK on success, NO_FILE if an logfile is not given, or otherwise just returns whatever get_log says.
int cmdc
Number of arguments
char** cmdv
Argument vector
Prototyped in: include/ubs-main.h
Calls: sub_help_cmd()src/cmd_help.c
  sub_list_logs()src/cmd_log.c
  atoi(), get_log(), getopt(), printf(), snprintf()

Global Function sub_list_logs()

int sub_list_logs ( int format )
int sub_list_logs
Returns OK on success, NO_DIR if the logfile directory can't be opened (which needs to be done for listing logs)
int format
Output format to use
Prototyped in: include/ubs-main.h
Calls: closedir(), opendir(), printf(), readdir(), strcmp()
Called by: cmd_log()src/cmd_log.c