Perfect. Thanks Randall On Mon, Mar 19, 2012 at 10:56 PM, <[email protected]> wrote: > Updated Branches: > refs/heads/1.2.x eaa9c4aee -> ede9482fc > > > restore some log messages after 04c4a10 > > > Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo > Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ede9482f > Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ede9482f > Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ede9482f > > Branch: refs/heads/1.2.x > Commit: ede9482fc3c9e629572ab1376d88f4499c4c8beb > Parents: eaa9c4a > Author: Randall Leeds <[email protected]> > Authored: Mon Mar 19 15:54:08 2012 -0700 > Committer: Randall Leeds <[email protected]> > Committed: Mon Mar 19 15:54:08 2012 -0700 > > ---------------------------------------------------------------------- > src/couchdb/couch_file.erl | 7 ++++++- > src/couchdb/couch_log.erl | 6 ++++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/couchdb/blob/ede9482f/src/couchdb/couch_file.erl > ---------------------------------------------------------------------- > diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl > index 5e476af..7725ddc 100644 > --- a/src/couchdb/couch_file.erl > +++ b/src/couchdb/couch_file.erl > @@ -53,14 +53,19 @@ open(Filepath, Options) -> > ignore -> > % get the error > receive > - {Ref, Pid, Error} -> > + {Ref, Pid, {error, Reason} = Error} -> > case process_info(self(), trap_exit) of > {trap_exit, true} -> receive {'EXIT', Pid, _} -> ok end; > {trap_exit, false} -> ok > end, > + ?LOG_ERROR("Error opening file ~s: ~s", > + [Filepath, file:format_error(Reason)]), > Error > end; > Error -> > + % We can't say much here, because it could be any kind of error. > + % Just let it bubble and an encapsulating subcomponent can perhaps > + % be more informative. It will likely appear in the SASL log, anyway. > Error > end. > > > http://git-wip-us.apache.org/repos/asf/couchdb/blob/ede9482f/src/couchdb/couch_log.erl > ---------------------------------------------------------------------- > diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl > index 7fb95a7..f299ba7 100644 > --- a/src/couchdb/couch_log.erl > +++ b/src/couchdb/couch_log.erl > @@ -89,8 +89,10 @@ init([]) -> > case file:open(Filename, [append]) of > {ok, Fd} -> > {ok, #state{fd = Fd, level = Level, sasl = Sasl}}; > - Error -> > - {stop, Error} > + {error, Reason} -> > + ReasonStr = file:format_error(Reason), > + io:format("Error opening log file ~s: ~s", [Filename, ReasonStr]), > + {stop, {error, ReasonStr, Filename}} > end. > > debug_on() -> >
-- Filipe David Manana, "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
