Repository: couchdb Updated Branches: refs/heads/log-file-by-default [created] 46824041c
Change default to log to a file, not stderr Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/46824041 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/46824041 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/46824041 Branch: refs/heads/log-file-by-default Commit: 46824041c4d0fdfe6917e0819d26eef2ae2846e8 Parents: 6415cd1 Author: Joan Touzet <woh...@atypical.net> Authored: Tue Aug 2 15:25:48 2016 -0400 Committer: Joan Touzet <woh...@atypical.net> Committed: Tue Aug 2 15:25:48 2016 -0400 ---------------------------------------------------------------------- configure | 22 ++++++++++++++++++++-- rel/overlay/etc/default.ini | 3 ++- 2 files changed, 22 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/46824041/configure ---------------------------------------------------------------------- diff --git a/configure b/configure index 74c5787..ea3c0ec 100755 --- a/configure +++ b/configure @@ -22,6 +22,7 @@ basename=`basename $0` PACKAGE_AUTHOR_NAME="The Apache Software Foundation" # TEST=0 +LOG_FILE="./var/log/couchdb.log" WITH_CURL="false" WITH_FAUXTON=1 WITH_DOCS=1 @@ -43,7 +44,7 @@ Options: # --prefix=DIRECTORY set the installation prefix (defaults to $DEFAULT_PREFIX) # --databasedir DIRECTORY specify the data directory (defaults to /var/lib/couchdb) # --viewindexdir DIRECTORY specify the view directory (defaults to /var/lib/couchdb) - # --logdir DIRECTORY specify the log file (defaults to /var/log/couchdb.log) + --logfile FILENAME specify the log file (defaults to ./var/log/couchdb.log) -c | --with-curl request that couchjs is linked to cURL (default false) --disable-fauxton do not build Fauxton --disable-docs do not build any documentation or manpages @@ -138,12 +139,29 @@ parse_opts() { printf 'ERROR: "--user" requires a non-empty argument.\n' >&2 exit 1 ;; + --logfile) + if [ -n "$2" ]; then + eval LOG_FILE=$2 + shift 2 + continue + else + printf 'ERROR: "--logfile" requires a non-empty argument.\n' >&2 + exit 1 + fi + ;; + --logfile=?*) + eval LOG_FILE=${1#*=} + ;; + --logfile=) + printf 'ERROR: "--logfile" requires a non-empty argument.\n' >&2 + exit 1 + ;; --) # End of options shift break ;; -?*) - echo "WARNING: Unkonwn option '$1', ignoring" >&2 + echo "WARNING: Unknown option '$1', ignoring" >&2 shift ;; *) # Done http://git-wip-us.apache.org/repos/asf/couchdb/blob/46824041/rel/overlay/etc/default.ini ---------------------------------------------------------------------- diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini index 5eeb938..2cc5b61 100644 --- a/rel/overlay/etc/default.ini +++ b/rel/overlay/etc/default.ini @@ -402,7 +402,8 @@ min_file_size = 131072 ; here if you want to implement your own ; writer. See couch_log_writer.erl for ; more information on the (simple) API. -writer = stderr +writer = file +file = {{log_file}} ; Options for the file writer ; file = /path/to/couch.log