couchdb-couch-log.git
21 months agoMerge branch '3340-fix-dns-timeout' of https://github.com/cloudant/couchdb-couch-log master
Joan Touzet [Mon, 27 Mar 2017 20:12:59 +0000 (16:12 -0400)] 
Merge branch '3340-fix-dns-timeout' of https://github.com/cloudant/couchdb-couch-log

21 months agoFix dns timeout for undefined syslog host 17/head
Jay Doane [Mon, 27 Mar 2017 06:46:15 +0000 (23:46 -0700)] 
Fix dns timeout for undefined syslog host

On some platforms, inet:getaddr can take several seconds to return when
passed the undefined atom, which is the default value of "syslog_host",
and therefore the value used when running tests. On platforms where it
takes longer to return than the test is allowed to run, the
couch_log_writer_syslog_test will fail with *timed out*.

This short circuits the case when "syslog_host" is undefined, and
removes the race from the test.

COUCHDB-3340

2 years agoMerge remote branch 'cloudant:3102-fix-config_subscription'
ILYA Khlopotov [Tue, 23 Aug 2016 21:59:34 +0000 (14:59 -0700)] 
Merge remote branch 'cloudant:3102-fix-config_subscription'

This closes #15

Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
2 years agoUpdate handle_config_terminate API 15/head
ILYA Khlopotov [Tue, 16 Aug 2016 23:46:58 +0000 (16:46 -0700)] 
Update handle_config_terminate API

COUCHDB-3102

2 years agoReally actually fix test for the config listener
Paul J. Davis [Wed, 10 Aug 2016 22:07:05 +0000 (17:07 -0500)] 
Really actually fix test for the config listener

Of course now that the handler is tied to the process that calls
listen_for_changes this test was racing the anonymous process that was
starting the handler.

This just turns couch_log_config_listener into a simple gen_server that
sits in couch_log's supervision tree that handles restarting the
listener.

COUCHDB-3069

2 years agoFix test for new config listener API
Paul J. Davis [Wed, 10 Aug 2016 21:43:20 +0000 (16:43 -0500)] 
Fix test for new config listener API

The old config listeners didn't include a PID to identify which process
corresponded to a given handler. This adjusts for that.

COUCHDB-3069

2 years agoFix test failure on Windows
Paul J. Davis [Fri, 5 Aug 2016 14:36:19 +0000 (09:36 -0500)] 
Fix test failure on Windows

The file writer test has a couple checks that rely on Unix style file
handling for log rotation. Moving and deleting open files isn't possible
on Windows so these tests are disabled there.

COUCHDB-3092

2 years agoAdd more formatting tests
Paul J. Davis [Mon, 25 Jul 2016 19:25:42 +0000 (14:25 -0500)] 
Add more formatting tests

2 years agoAdding more tests
Paul J. Davis [Mon, 25 Jul 2016 18:54:57 +0000 (13:54 -0500)] 
Adding more tests

2 years agoReformat emulator error messages
Paul J. Davis [Mon, 25 Jul 2016 17:58:29 +0000 (12:58 -0500)] 
Reformat emulator error messages

2 years agoAdd format character for process exit traces
Paul J. Davis [Mon, 25 Jul 2016 17:26:49 +0000 (12:26 -0500)] 
Add format character for process exit traces

When receiving an 'EXIT' or 'DOWN' message the Reason term can now be
formatted by couch_log using a "~r" format character.

2 years agoAdd support for traces with an argument list
Paul J. Davis [Mon, 25 Jul 2016 17:26:28 +0000 (12:26 -0500)] 
Add support for traces with an argument list

2 years agoMerge branch '3067-improve-couch-log'
Paul J. Davis [Fri, 22 Jul 2016 09:49:29 +0000 (04:49 -0500)] 
Merge branch '3067-improve-couch-log'

2 years agoAdd test suite for couch_log 13/head
Paul J. Davis [Wed, 20 Jul 2016 17:53:50 +0000 (12:53 -0500)] 
Add test suite for couch_log

COUCHDB-3067

2 years agoAdd a syslog writer
Paul J. Davis [Wed, 20 Jul 2016 17:01:54 +0000 (12:01 -0500)] 
Add a syslog writer

COUCHDB-3067

2 years agoMake couch_log smarter
Paul J. Davis [Wed, 20 Jul 2016 00:14:33 +0000 (19:14 -0500)] 
Make couch_log smarter

This drops the lager and goldrush dependencies and instead moves all
logic to couch_log so that we can make our logging work more closely
with the existing configuration system.

COUCHDB-3067

2 years agoMerge remote branch 'cloudant:fix-is_active_level-type-spec'
ILYA Khlopotov [Tue, 3 May 2016 15:31:51 +0000 (08:31 -0700)] 
Merge remote branch 'cloudant:fix-is_active_level-type-spec'

This closes #12

Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
2 years agoFix couch_log:is_active_level/1 type spec 12/head
ILYA Khlopotov [Tue, 3 May 2016 14:08:24 +0000 (07:08 -0700)] 
Fix couch_log:is_active_level/1 type spec

2 years agoRemove module_loaded check in get_backend
Mike Wallace [Thu, 10 Mar 2016 14:15:15 +0000 (14:15 +0000)] 
Remove module_loaded check in get_backend

When the code server loads modules dynamically,
module_loaded(Backend) will not return true until it has actually
been called. Since couch_log is the only thing that calls it this
can result in the backend module never being loaded.

Closes COUCHDB-2968

This closes #11

3 years agoMake couch_log configurable 10/head
Alexander Shorin [Mon, 23 Nov 2015 04:25:02 +0000 (07:25 +0300)] 
Make couch_log configurable

This allows to set logging backend and level via config API making
logging configuration a bit closer as it was in CouchDB 1.x.

3 years agoCollect stats for alert log messages
Alexander Shorin [Tue, 24 Nov 2015 05:42:25 +0000 (08:42 +0300)] 
Collect stats for alert log messages

3 years agoFormat long line
Alexander Shorin [Tue, 24 Nov 2015 05:40:24 +0000 (08:40 +0300)] 
Format long line

3 years agoAdd missed emergency callback
Alexander Shorin [Tue, 24 Nov 2015 01:05:33 +0000 (04:05 +0300)] 
Add missed emergency callback

3 years agoIntegrate with Travis CI
Alexander Shorin [Mon, 23 Nov 2015 04:27:30 +0000 (07:27 +0300)] 
Integrate with Travis CI

3 years agoDefine behavioural callbacks with modern syntax 7/head
Eric Avdey [Thu, 8 Oct 2015 12:43:33 +0000 (09:43 -0300)] 
Define behavioural callbacks with modern syntax

3 years agoAssert the whole calls history 6/head
Eric Avdey [Fri, 25 Sep 2015 15:57:17 +0000 (12:57 -0300)] 
Assert the whole calls history

3 years agoRemove the custom backend, mock it instead
Eric Avdey [Fri, 25 Sep 2015 15:19:54 +0000 (12:19 -0300)] 
Remove the custom backend, mock it instead

3 years agoIsolate couch_log from backend for unit testing
Eric Avdey [Fri, 25 Sep 2015 13:40:16 +0000 (10:40 -0300)] 
Isolate couch_log from backend for unit testing

This adds a custom backend for unit testing to decouple
couch_log from project specific backend and allow to assert
that callback calls carried through.

3 years agofix tests for any backend
Robert Newson [Wed, 23 Sep 2015 12:44:35 +0000 (13:44 +0100)] 
fix tests for any backend

3 years agoremove unused clause
Robert Newson [Mon, 21 Sep 2015 10:07:00 +0000 (11:07 +0100)] 
remove unused clause

3 years agoRecognise rebar templater's list format 5/head
Eric Avdey [Mon, 21 Sep 2015 02:11:20 +0000 (23:11 -0300)] 
Recognise rebar templater's list format

3 years agoChoose backend at build time 4/head
Robert Newson [Fri, 18 Sep 2015 09:41:13 +0000 (10:41 +0100)] 
Choose backend at build time

This allows us to set the backend as a dependency of the front end,
ensuring it is started first. This also means we don't need to call
application:load/1.

3 years agoAdd tests and specs
Eric Avdey [Thu, 17 Sep 2015 21:07:44 +0000 (18:07 -0300)] 
Add tests and specs

3 years agoAdd stderr logger implementation. Make it to fail-safe.
Eric Avdey [Thu, 17 Sep 2015 21:03:02 +0000 (18:03 -0300)] 
Add stderr logger implementation. Make it to fail-safe.

3 years agoConvert couch_log into behaviour
Eric Avdey [Thu, 17 Sep 2015 21:00:22 +0000 (18:00 -0300)] 
Convert couch_log into behaviour

3 years agoAdd ability to change log level at runtime 3/head
Robert Newson [Thu, 17 Sep 2015 12:06:39 +0000 (13:06 +0100)] 
Add ability to change log level at runtime

3 years agoadd license file
Robert Kowalski [Sat, 14 Mar 2015 18:57:51 +0000 (19:57 +0100)] 
add license file

4 years agocouch_stats is an optional dependency
Robert Newson [Fri, 10 Oct 2014 13:00:37 +0000 (14:00 +0100)] 
couch_stats is an optional dependency

4 years agoRevert "Move dependencies to the top level repository"
Robert Newson [Tue, 7 Oct 2014 11:26:14 +0000 (12:26 +0100)] 
Revert "Move dependencies to the top level repository"

This reverts commit 105ae0103f21d62364334071e61ad0d4a2accc8e.

4 years agoMove dependencies to the top level repository
Paul J. Davis [Mon, 6 Oct 2014 22:24:12 +0000 (17:24 -0500)] 
Move dependencies to the top level repository

4 years agoCollect stats for log messages
Robert Newson [Mon, 15 Sep 2014 17:07:43 +0000 (18:07 +0100)] 
Collect stats for log messages

4 years agoUse the master branch of lager
Paul J. Davis [Tue, 2 Sep 2014 21:12:56 +0000 (16:12 -0500)] 
Use the master branch of lager

We need to tag lager with something so that we're using the ASF mirror
of Goldrush.

4 years agoSpecify a tag for the lager dependency
Paul J. Davis [Tue, 2 Sep 2014 20:30:24 +0000 (15:30 -0500)] 
Specify a tag for the lager dependency

4 years agoFix typo in rebar.config
Paul J. Davis [Mon, 25 Aug 2014 07:30:40 +0000 (02:30 -0500)] 
Fix typo in rebar.config

4 years agoDon't use the old lager tag
Paul J. Davis [Mon, 25 Aug 2014 07:23:39 +0000 (02:23 -0500)] 
Don't use the old lager tag

4 years agoUse the ASF mirror of lager.
Paul J. Davis [Mon, 25 Aug 2014 07:17:18 +0000 (02:17 -0500)] 
Use the ASF mirror of lager.

4 years agoget vsn from git
Robert Newson [Fri, 30 May 2014 13:34:24 +0000 (14:34 +0100)] 
get vsn from git

4 years agoChange API to function per level 1843-feature-bigcouch
Robert Newson [Wed, 12 Feb 2014 23:15:32 +0000 (23:15 +0000)] 
Change API to function per level

4 years agoInitial commit
Robert Newson [Wed, 12 Feb 2014 20:08:54 +0000 (20:08 +0000)] 
Initial commit