You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/02/12 23:46:34 UTC
couch-log commit: updated refs/heads/1843-feature-bigcouch to 6bdc625
Updated Branches:
refs/heads/1843-feature-bigcouch [created] 6bdc62529
Initial commit
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/commit/6bdc6252
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/tree/6bdc6252
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/diff/6bdc6252
Branch: refs/heads/1843-feature-bigcouch
Commit: 6bdc625293ee74e92e60abbebc1d7fdede419d4b
Parents:
Author: Robert Newson <ro...@cloudant.com>
Authored: Wed Feb 12 20:08:54 2014 +0000
Committer: Robert Newson <ro...@cloudant.com>
Committed: Wed Feb 12 20:09:12 2014 +0000
----------------------------------------------------------------------
.gitignore | 1 +
rebar.config | 7 +++++++
src/couch_log.app.src | 19 +++++++++++++++++++
src/couch_log.erl | 38 ++++++++++++++++++++++++++++++++++++++
4 files changed, 65 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/blob/6bdc6252/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3b66f4e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/ebin
http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/blob/6bdc6252/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
new file mode 100644
index 0000000..44a8a13
--- /dev/null
+++ b/rebar.config
@@ -0,0 +1,7 @@
+{deps, [
+ {lager, ".*", {git, "https://github.com/basho/lager.git", {tag, "2.0.2"}}}
+]}.
+
+{erl_opts, [debug_info, {parse_transform, lager_transform}]}.
+
+
http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/blob/6bdc6252/src/couch_log.app.src
----------------------------------------------------------------------
diff --git a/src/couch_log.app.src b/src/couch_log.app.src
new file mode 100644
index 0000000..5ae3131
--- /dev/null
+++ b/src/couch_log.app.src
@@ -0,0 +1,19 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+{application, couch_log, [
+ {description, "CouchDB Log API"},
+ {vsn, "@version@"},
+ {modules, [couch_log]},
+ {registered, []},
+ {applications, [kernel, stdlib, lager]}
+]}.
http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/blob/6bdc6252/src/couch_log.erl
----------------------------------------------------------------------
diff --git a/src/couch_log.erl b/src/couch_log.erl
new file mode 100644
index 0000000..0e84dd9
--- /dev/null
+++ b/src/couch_log.erl
@@ -0,0 +1,38 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(couch_log).
+
+-export([log/3]).
+
+log(debug, Msg, Args) ->
+ lager:debug(Msg, Args);
+log(info, Msg, Args) ->
+ lager:info(Msg, Args);
+log(notice, Msg, Args) ->
+ lager:notice(Msg, Args);
+log(warn, Msg, Args) ->
+ lager:warning(Msg, Args);
+log(warning, Msg, Args) ->
+ lager:warning(Msg, Args);
+log(err, Msg, Args) ->
+ lager:error(Msg, Args);
+log(error, Msg, Args) ->
+ lager:error(Msg, Args);
+log(critical, Msg, Args) ->
+ lager:critical(Msg, Args);
+log(alert, Msg, Args) ->
+ lager:alert(Msg, Args);
+log(emerg, Msg, Args) ->
+ lager:emergency(Msg, Args);
+log(emergency, Msg, Args) ->
+ lager:emergency(Msg, Args).