<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/couch_log, branch decrease-indexer-transaction-time-limit</title>
<subtitle>github.com: apache/couchdb.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/'/>
<entry>
<title>Fix error_logger reports for OTP &gt;= 21</title>
<updated>2021-03-18T21:45:16+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2021-03-17T06:36:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=4f0574d1b2cbbd64501ec0468ad37b553a8a86de'/>
<id>4f0574d1b2cbbd64501ec0468ad37b553a8a86de</id>
<content type='text'>
Starting with OTP 21 there is a new logging system, and we forgot to
add the legacy error logger handler for it. Without it `couch_log`
cannot emit gen_server, supervisor and other such system events.

Luckily, there is OTP support to enable legacy error_logger behavior and
that's what we're doing here. The `add_report_handler/1` call will
auto-start the `error_logger` app if needed, and it will also add an
`error_logger` handler to the global `logger` system.

We also keep the `gen_event:add_sup_handler/3` call, as that will
ensure we'll find out when `error_logger` dies so that
`couch_log_monitor` can restart everything.

Someday(TM) we'll write a proper log event handler for the new logger
and have nicely formatted structured logs, but it's better to do that
once we don't have to support OTP versions =&lt; 20.

Issue: https://github.com/apache/couchdb/pull/3422
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting with OTP 21 there is a new logging system, and we forgot to
add the legacy error logger handler for it. Without it `couch_log`
cannot emit gen_server, supervisor and other such system events.

Luckily, there is OTP support to enable legacy error_logger behavior and
that's what we're doing here. The `add_report_handler/1` call will
auto-start the `error_logger` app if needed, and it will also add an
`error_logger` handler to the global `logger` system.

We also keep the `gen_event:add_sup_handler/3` call, as that will
ensure we'll find out when `error_logger` dies so that
`couch_log_monitor` can restart everything.

Someday(TM) we'll write a proper log event handler for the new logger
and have nicely formatted structured logs, but it's better to do that
once we don't have to support OTP versions =&lt; 20.

Issue: https://github.com/apache/couchdb/pull/3422
</pre>
</div>
</content>
</entry>
<entry>
<title>Add format_status/2 callback in gen_server implementations</title>
<updated>2020-07-30T12:10:08+00:00</updated>
<author>
<name>ILYA Khlopotov</name>
<email>iilyak@apache.org</email>
</author>
<published>2020-07-23T15:05:12+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=97e7a95c3c25c1ece7db25ee87e6476ba0a11282'/>
<id>97e7a95c3c25c1ece7db25ee87e6476ba0a11282</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Strip last_msg from logs</title>
<updated>2020-07-30T12:10:08+00:00</updated>
<author>
<name>ILYA Khlopotov</name>
<email>iilyak@apache.org</email>
</author>
<published>2020-07-20T18:37:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=e1b4259a9e0714fb78f740ee763dd12f84bbca1a'/>
<id>e1b4259a9e0714fb78f740ee763dd12f84bbca1a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>a systemd-journald compatible log output on stderr (#1912)</title>
<updated>2020-01-05T12:54:55+00:00</updated>
<author>
<name>Дамјан Георгиевски</name>
<email>gdamjan@gmail.com</email>
</author>
<published>2020-01-05T12:54:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=c2ff7da78e3be137f6790b5d64aaf157348b1e4b'/>
<id>c2ff7da78e3be137f6790b5d64aaf157348b1e4b</id>
<content type='text'>
* a systemd-journald compatible log output on stderr

based on the stderr logger but changed:
- doesn't output the timestamp, the journal already has a timestamp
- output the log level as &lt;num&gt; where num is defined as in `sd-daemon(3)`

https://www.freedesktop.org/software/systemd/man/sd-daemon.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* a systemd-journald compatible log output on stderr

based on the stderr logger but changed:
- doesn't output the timestamp, the journal already has a timestamp
- output the log level as &lt;num&gt; where num is defined as in `sd-daemon(3)`

https://www.freedesktop.org/software/systemd/man/sd-daemon.html
</pre>
</div>
</content>
</entry>
<entry>
<title>Move eunit tests into test/eunit directory</title>
<updated>2019-07-29T11:24:37+00:00</updated>
<author>
<name>ILYA Khlopotov</name>
<email>iilyak@apache.org</email>
</author>
<published>2019-05-10T00:45:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=cf60cffb44bf18889aa8362b616bafb7bed87445'/>
<id>cf60cffb44bf18889aa8362b616bafb7bed87445</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove obsolete travis files</title>
<updated>2018-12-28T04:53:31+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jay.s.doane@gmail.com</email>
</author>
<published>2018-12-23T08:52:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=c347470851e1cd62f5c304f15ef9d5ee1b34d1b4'/>
<id>c347470851e1cd62f5c304f15ef9d5ee1b34d1b4</id>
<content type='text'>
These files were used when their apps had separate repositories, but are
obsolete in the "mono repo" since their apps are built together using
the top level .travis.yml now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These files were used when their apps had separate repositories, but are
obsolete in the "mono repo" since their apps are built together using
the top level .travis.yml now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress export-related compiler warnings</title>
<updated>2018-12-27T21:07:57+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jay.s.doane@gmail.com</email>
</author>
<published>2018-12-27T20:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=4e75964898bd49218087de1e02391300da024e6c'/>
<id>4e75964898bd49218087de1e02391300da024e6c</id>
<content type='text'>
- For export_all warnings: either replace with explicit exports, add
nowarn_export_all compiler directives when appropriate, or in the case
of couch_epi_sup, move the test to dedicated test file and export the
function needed for testing.

- For "function already exported" warning in couch_key_tree_prop_tests,
remove include_lib attribute for eunit.hrl since it already gets
imported in triq.hrl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- For export_all warnings: either replace with explicit exports, add
nowarn_export_all compiler directives when appropriate, or in the case
of couch_epi_sup, move the test to dedicated test file and export the
function needed for testing.

- For "function already exported" warning in couch_key_tree_prop_tests,
remove include_lib attribute for eunit.hrl since it already gets
imported in triq.hrl
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve restart resilience of couch_log application</title>
<updated>2018-10-18T14:51:14+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2018-10-17T21:43:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=c980b8016dcf2c205571c3fb9d25f44e2f631074'/>
<id>c980b8016dcf2c205571c3fb9d25f44e2f631074</id>
<content type='text'>
Previously it was too easy to crash the whole node when any of couch_log's
children restarted. To improve resiliency, let couch_log application restart
a few more times before taking down the whole node with it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously it was too easy to crash the whole node when any of couch_log's
children restarted. To improve resiliency, let couch_log application restart
a few more times before taking down the whole node with it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not crash couch_log application when gen_* servers send extra args</title>
<updated>2018-10-18T14:51:14+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2018-10-17T20:24:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=92c7530fc8d5d881cdb452b5412f91b9ead4f1dd'/>
<id>92c7530fc8d5d881cdb452b5412f91b9ead4f1dd</id>
<content type='text'>
gen_server, gen_fsm and gen_statem might send extra args when terminating. This
is a recent behavior and not handling these extra args could lead to couch_log
application crashing and taking down the whole VM with it.

There are two improvements to fix the issue:

 1) Handle the extra args. Format them and log as they might have useful
 information included.

 2) Wrap the whole `format` function in a `try ... catch` statement. This will
 avoid any other cases where the logger itself if crashing when attepting to
 format error events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gen_server, gen_fsm and gen_statem might send extra args when terminating. This
is a recent behavior and not handling these extra args could lead to couch_log
application crashing and taking down the whole VM with it.

There are two improvements to fix the issue:

 1) Handle the extra args. Format them and log as they might have useful
 information included.

 2) Wrap the whole `format` function in a `try ... catch` statement. This will
 avoid any other cases where the logger itself if crashing when attepting to
 format error events.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix couch_log eunit tests</title>
<updated>2018-10-04T16:30:48+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2018-06-21T17:44:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=2e8cde50bd3973fdb40fcd7c0ecd9d299b80dc85'/>
<id>2e8cde50bd3973fdb40fcd7c0ecd9d299b80dc85</id>
<content type='text'>
Fixes #1396
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #1396
</pre>
</div>
</content>
</entry>
</feed>
