From 3dd5e316e4c36f0d3d3956a3e3df9ac875b40e64 Mon Sep 17 00:00:00 2001 From: AngelCarpintero Date: Tue, 30 Mar 2010 14:34:54 +0000 Subject: [PATCH] Added logfile information to man page --- conf.c | 8 ++++---- configure | 18 +++++++++--------- motion.1 | 10 +++++++++- motion.c | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/conf.c b/conf.c index c430e53..828c308 100644 --- a/conf.c +++ b/conf.c @@ -1502,11 +1502,11 @@ static void conf_cmdline(struct context *cnt, int thread) case 'd': /* no validation - just take what user gives */ debug_level = (unsigned int)atoi(optarg); - break; + break; case 'p': - if (thread == -1) - strcpy(cnt->pid_file, optarg); - break; + if (thread == -1) + strcpy(cnt->pid_file, optarg); + break; case 'l': if (thread == -1) strcpy(cnt->log_file, optarg); diff --git a/configure b/configure index 25da831..db04bca 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for motion trunkREV499. +# Generated by GNU Autoconf 2.64 for motion trunkREV500. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software @@ -546,8 +546,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='motion' PACKAGE_TARNAME='motion' -PACKAGE_VERSION='trunkREV499' -PACKAGE_STRING='motion trunkREV499' +PACKAGE_VERSION='trunkREV500' +PACKAGE_STRING='motion trunkREV500' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1210,7 +1210,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures motion trunkREV499 to adapt to many kinds of systems. +\`configure' configures motion trunkREV500 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1271,7 +1271,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of motion trunkREV499:";; + short | recursive ) echo "Configuration of motion trunkREV500:";; esac cat <<\_ACEOF @@ -1412,7 +1412,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -motion configure trunkREV499 +motion configure trunkREV500 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2009,7 +2009,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by motion $as_me trunkREV499, which was +It was created by motion $as_me trunkREV500, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -5790,7 +5790,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by motion $as_me trunkREV499, which was +This file was extended by motion $as_me trunkREV500, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5850,7 +5850,7 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -motion config.status trunkREV499 +motion config.status trunkREV500 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/motion.1 b/motion.1 index 5e86b0e..906a5d6 100644 --- a/motion.1 +++ b/motion.1 @@ -3,7 +3,7 @@ motion \- Detect motion using a video4linux device .SH SYNOPSIS .B motion -[ -hns ] [ -c config file path ] [ -d level ] [ -p process_id_file ] +[ -hns ] [ -c config file path ] [ -d level ] [ -p process_id_file ] [ -l logfile ] .SH DESCRIPTION .I Motion uses a video4linux device to detect motion. If motion is detected both normal @@ -29,6 +29,9 @@ Run in debug mode, level 1-9. .B \-p Full path and filename for process id file (pid file). E.g /var/run/motion.pid. Default is not defined. Pid file is only created when Motion is started in daemon mode. .TP +.B \-l +Full path and filename of log file. +.TP .SH "CONFIG FILE OPTIONS" These are the options that can be used in the config file. .I They are overridden by the commandline! @@ -194,6 +197,11 @@ Values: on, off, redbox, center, redcross, preview / Default: off .br Locate and draw a box around the moving object. Value 'preview' makes Motion only draw a box on a saved preview jpeg image and not on the saved movie. .TP +.B logfile string +Values: Max 4095 characters / Default: Not defined +.br +Use a file to save logs messages, if not defined stderr and syslog is used. +.TP .B mask_file string Values: Max 4095 characters / Default: Not defined .br diff --git a/motion.c b/motion.c index 2755d50..c881c0d 100644 --- a/motion.c +++ b/motion.c @@ -239,7 +239,7 @@ static void image_save_as_preview(struct context *cnt, struct image_data *img) * * Returns: nothing */ -static void context_init (struct context *cnt) +static void context_init(struct context *cnt) { /* * We first clear the entire structure to zero, then fill in any