couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject couchdb commit: updated refs/heads/log-file-by-default to 7ab6f2f [Forced Update!]
Date Tue, 02 Aug 2016 19:33:06 GMT
Repository: couchdb
Updated Branches:
  refs/heads/log-file-by-default 46824041c -> 7ab6f2fda (forced update)


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/7ab6f2fd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7ab6f2fd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7ab6f2fd

Branch: refs/heads/log-file-by-default
Commit: 7ab6f2fda9568fca85ca0080149131215d153a0e
Parents: 6415cd1
Author: Joan Touzet <wohali@atypical.net>
Authored: Tue Aug 2 15:25:48 2016 -0400
Committer: Joan Touzet <wohali@atypical.net>
Committed: Tue Aug 2 15:32:25 2016 -0400

----------------------------------------------------------------------
 configure                   | 22 ++++++++++++++++++++--
 configure.ps1               |  2 +-
 rel/overlay/etc/default.ini |  3 ++-
 3 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7ab6f2fd/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/7ab6f2fd/configure.ps1
----------------------------------------------------------------------
diff --git a/configure.ps1 b/configure.ps1
index b9ed805..1fa9292 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -136,7 +136,7 @@ $CouchDBConfig = @"
 {prefix, "."}.
 {data_dir, "./data"}.
 {view_index_dir, "./data"}.
-{log_file, ""}.
+{log_file, "./var/log/couchdb.log"}.
 {fauxton_root, "./share/www"}.
 {user, "$CouchDBUser"}.
 {node_name, "-name couchdb@localhost"}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7ab6f2fd/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


Mime
View raw message