diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-08-15 02:09:16 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-08-15 02:09:16 +0000 |
commit | f56afb1ea2dbd59262947ed27bb1913394aeb5c6 (patch) | |
tree | 240b1d142ddcf20a7398c06a7075f0ab169acc3b /src/couchdb/couch_log.erl | |
parent | bff8b7d9751fad8319124fbfa238446170885b21 (diff) |
replace regexp with re. Thanks Kim Shrier, Gordon Stratton. Closes COUCHDB-245
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@804428 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_log.erl')
-rw-r--r-- | src/couchdb/couch_log.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl index 83fa6e06..5a45c207 100644 --- a/src/couchdb/couch_log.erl +++ b/src/couchdb/couch_log.erl @@ -119,7 +119,8 @@ terminate(_Arg, {Fd, _LoggingLevel}) -> log(Fd, Pid, Level, Format, Args) -> Msg = io_lib:format(Format, Args), ok = io:format("[~s] [~p] ~s~n", [Level, Pid, Msg]), % dump to console too - {ok, Msg2, _} = regexp:gsub(lists:flatten(Msg),"\\r\\n|\\r|\\n", "\r\n"), + Msg2 = re:replace(lists:flatten(Msg),"\\r\\n|\\r|\\n", "\r\n", + [global, {return, list}]), ok = io:format(Fd, "[~s] [~s] [~p] ~s\r~n\r~n", [httpd_util:rfc1123_date(), Level, Pid, Msg2]). read(Bytes, Offset) -> |