summaryrefslogtreecommitdiff
path: root/gemfeed
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2022-03-06 18:15:30 +0000
committerPaul Buetow <paul@buetow.org>2022-03-06 18:15:30 +0000
commit9ff5f260072e25431c7cfbe176d8d83e74bbf9ac (patch)
treeff1a072613c24965eb1e6c17fad824fe65eebedd /gemfeed
parentc995565f66f7cbdd20f3407902d044412c22b408 (diff)
Publishing new version
Diffstat (limited to 'gemfeed')
-rw-r--r--gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html254
-rw-r--r--gemfeed/atom.xml254
-rw-r--r--gemfeed/index.html1
-rw-r--r--gemfeed/style.css2
4 files changed, 509 insertions, 2 deletions
diff --git a/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html
new file mode 100644
index 00000000..b3442662
--- /dev/null
+++ b/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html
@@ -0,0 +1,254 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>The release of DTail 4.0.0</title>
+<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
+<link rel="stylesheet" href="style.css" />
+</head>
+<body>
+<h1>The release of DTail 4.0.0</h1>
+<pre>
+ ,_---~~~~~----._
+ _,,_,*^____ _____``*g*\"*,
+ ____ _____ _ _ / __/ /' ^. / \ ^@q f
+ | _ \_ _|_ _(_) | @f | @)) | | @)) l 0 _/
+ | | | || |/ _` | | | \`/ \~____ / __ \_____/ \
+ | |_| || | (_| | | | | _l__l_ I
+ |____/ |_|\__,_|_|_| } [______] I
+ ] | | | |
+ ] ~ ~ |
+ | |
+ | |
+</pre>
+<p class="quote"><i>Published by Paul at 2022-03-06</i></p>
+<p>I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. You can also read my previous post about DTail in case you wonder what DTail is:</p>
+<a class="textlink" href="./2021-04-22-dtail-the-distributed-log-tail-program.html">DTail - The distributed log tail program</a><br />
+<p>If you want to jump directly to DTail, do it here (there are nice animated gifs which demonstrates the usage pretty well):</p>
+<a class="textlink" href="https://dtail.dev">https://dtail.dev</a><br />
+<h2>So, what's new in 4.0.0?</h2>
+<h3>Rewritten logging</h3>
+<p>For DTail 4, logging has been completely rewritten. The new package name is "internal/io/dlog". I rewrote the logging because DTail is a special case here: There are logs processed by DTail, there are logs produced by the DTail server itself, there are logs produced by a DTail client itself, there are logs only logged by a DTail client, there are logs only logged by the DTail server, and there are logs logged by both, server and client. There are also different logging levels and outputs involved.</p>
+<p>As you can imagine, it becomes fairly complex. There is no ready Go off-shelf logging library which suits my needs and the logging code in DTail 3 was just one big source code file with global variables and it wasn't sustainable to maintain anymore. So why not rewrite it for profit and fun? </p>
+<p>There's a are new log level structure now (The log level now can be specified with the "-logLevel" command line flag):</p>
+<pre>
+// Available log levels.
+const (
+ None level = iota
+ Fatal level = iota
+ Error level = iota
+ Warn level = iota
+ Info level = iota
+ Default level = iota
+ Verbose level = iota
+ Debug level = iota
+ Devel level = iota
+ Trace level = iota
+ All level = iota
+)
+</pre>
+<p>DTail also supports multiple log outputs (e.g. to file or to stdout). More are now easily pluggable with the new logging package. The output can also be "enriched" (default) or "plain" (read more about that further below).</p>
+<h3>Configurable terminal color codes</h3>
+<p>A complaint I received from the users of DTail 3 were the terminal colors used for the output. Under some circumstances (terminal configuration) it made the output difficult to read so that users defaulted to "--noColor" (disabling colored output completely). I toke it by heart and also rewrote the color handling. It's now possible to configure the foreground and background colors and an attribute (e.g. dim, bold, ...).</p>
+<p>The example "dtail.json" configuration file represents the default (now, more reasonable default) color codes used, and it is free to the user to customize them:</p>
+<pre>
+{
+ "Client": {
+ "TermColorsEnable": true,
+ "TermColors": {
+ "Remote": {
+ "DelimiterAttr": "Dim",
+ "DelimiterBg": "Blue",
+ "DelimiterFg": "Cyan",
+ "RemoteAttr": "Dim",
+ "RemoteBg": "Blue",
+ "RemoteFg": "White",
+ "CountAttr": "Dim",
+ "CountBg": "Blue",
+ "CountFg": "White",
+ "HostnameAttr": "Bold",
+ "HostnameBg": "Blue",
+ "HostnameFg": "White",
+ "IDAttr": "Dim",
+ "IDBg": "Blue",
+ "IDFg": "White",
+ "StatsOkAttr": "None",
+ "StatsOkBg": "Green",
+ "StatsOkFg": "Black",
+ "StatsWarnAttr": "None",
+ "StatsWarnBg": "Red",
+ "StatsWarnFg": "White",
+ "TextAttr": "None",
+ "TextBg": "Black",
+ "TextFg": "White"
+ },
+ "Client": {
+ "DelimiterAttr": "Dim",
+ "DelimiterBg": "Yellow",
+ "DelimiterFg": "Black",
+ "ClientAttr": "Dim",
+ "ClientBg": "Yellow",
+ "ClientFg": "Black",
+ "HostnameAttr": "Dim",
+ "HostnameBg": "Yellow",
+ "HostnameFg": "Black",
+ "TextAttr": "None",
+ "TextBg": "Black",
+ "TextFg": "White"
+ },
+ "Server": {
+ "DelimiterAttr": "AttrDim",
+ "DelimiterBg": "BgCyan",
+ "DelimiterFg": "FgBlack",
+ "ServerAttr": "AttrDim",
+ "ServerBg": "BgCyan",
+ "ServerFg": "FgBlack",
+ "HostnameAttr": "AttrBold",
+ "HostnameBg": "BgCyan",
+ "HostnameFg": "FgBlack",
+ "TextAttr": "AttrNone",
+ "TextBg": "BgBlack",
+ "TextFg": "FgWhite"
+ },
+ "Common": {
+ "SeverityErrorAttr": "AttrBold",
+ "SeverityErrorBg": "BgRed",
+ "SeverityErrorFg": "FgWhite",
+ "SeverityFatalAttr": "AttrBold",
+ "SeverityFatalBg": "BgMagenta",
+ "SeverityFatalFg": "FgWhite",
+ "SeverityWarnAttr": "AttrBold",
+ "SeverityWarnBg": "BgBlack",
+ "SeverityWarnFg": "FgWhite"
+ },
+ "MaprTable": {
+ "DataAttr": "AttrNone",
+ "DataBg": "BgBlue",
+ "DataFg": "FgWhite",
+ "DelimiterAttr": "AttrDim",
+ "DelimiterBg": "BgBlue",
+ "DelimiterFg": "FgWhite",
+ "HeaderAttr": "AttrBold",
+ "HeaderBg": "BgBlue",
+ "HeaderFg": "FgWhite",
+ "HeaderDelimiterAttr": "AttrDim",
+ "HeaderDelimiterBg": "BgBlue",
+ "HeaderDelimiterFg": "FgWhite",
+ "HeaderSortKeyAttr": "AttrUnderline",
+ "HeaderGroupKeyAttr": "AttrReverse",
+ "RawQueryAttr": "AttrDim",
+ "RawQueryBg": "BgBlack",
+ "RawQueryFg": "FgCyan"
+ }
+ }
+ },
+ ...
+}
+</pre>
+<p>You notice the different sections - these are different contexts:</p>
+<ul>
+<li>Remote: Color configuration for all log lines sent remotely from the server to the client. </li>
+<li>Client: Color configuration for all lines produced by a DTail client by itself (e.g. status information).</li>
+<li>Server: Color configuration for all lines produced by the DTail server by itself and sent to the client (e.g. server warnings or errors)</li>
+<li>MaprTable: Color configuration for the map-reduce table output.</li>
+<li>Common: Common color configuration used in various places (e.g. when it's not clear what's the current context of a line).</li>
+</ul>
+<p>When you do so, make sure that you check your "dtail.json" against the JSON schema file. This is to ensure that you don't configure an invalid color accidentally (requires "jsonschema" to be installed on your computer). Furthermore, the schema file is also a good reference for all possible colors available:</p>
+<pre>
+jsonschema -i dtail.json schemas/dtail.schema.json
+</pre>
+<h3>Serverless mode</h3>
+<p>All DTail commands can now operate on log files (and other text files) directly without any DTail server running. So there isn't a need anymore to install a DTail server when you are on the target server already anyway, like the following example shows:</p>
+<pre>
+% dtail --files /var/log/foo.log
+</pre>
+<p>or</p>
+<pre>
+% dmap --files /var/log/foo.log --query 'from TABLE select .... outfile result.csv'
+</pre>
+<p>The way it works in Go code is that a connection to a server is managed through an interface and in serverless mode DTail calls through that interface to the server code directly without any TCP/IP and SSH connection made in the background. This means, that the binaries are a bit larger (also ship with the code which normally would be executed by the server) but the increase of binary size is not much.</p>
+<h3>Shorthand flags</h3>
+<p>The "--files" from the previous example is now redundant. As a shorthand, It is now possible to do the following instead:</p>
+<pre>
+% dtail /var/log/foo.log
+</pre>
+<p>Of course, this also works with all other DTail client commands (dgrep, dcat, ... etc).</p>
+<h3>Spartan (aka plain) mode</h3>
+<p>There's a plain mode, which makes DTail only print out the "plain" text of the files operated on (without any DTail specific enriched output). E.g.:</p>
+<pre>
+% dcat --plain /etc/passwd &gt; /etc/test
+% diff /etc/test /etc/passwd # Same content, no diff
+</pre>
+<p>This might be useful if you wanted to post-process the output. </p>
+<h3>Standard input pipe</h3>
+<p>In serverless mode, you might want to process your data in a pipeline. You can do that now too through an input pipe:</p>
+<pre>
+% dgrep --plain --regex 'somethingspecial' /var/log/foo.log |
+ dmap --query 'from TABLE select .... outfile result.csv'
+</pre>
+<p>Or, use any other "standard" tool:</p>
+<pre>
+% awk '.....' &lt; /some/file | dtail ....
+</pre>
+<h3>New command dtailhealth</h3>
+<p>Prior to DTail 4, there was a flag for the "dtail" command to check the health of a remote DTail server (for use with monitoring system such as Nagios). That has been moved out to a separate binary to reduce complexity of the "dtail" command. The following checks whether DTail is operational on the current machine (you could also check a remote instance of DTail server, just adjust the server address).</p>
+<pre>
+% cat check_dtail.sh
+#!/bin/sh
+
+exec /usr/local/bin/dtailhealth --server localhost:2222
+</pre>
+<h3>Improved documentation</h3>
+<p>Some features, such as custom log formats and the map-reduce query language, are now documented. Also, the examples have been updated to reflect the new features added. This also includes the new animated example Gifs (plus documentation how they were created).</p>
+<p>I must admit that not all features are documented yet:</p>
+<ul>
+<li>Server side scheduled map-reduce queries</li>
+<li>Server side continuous map-reduce queries</li>
+<li>Some more docs about terminal color customization</li>
+<li>Some more docs about log levels</li>
+</ul>
+<p>That will be added in one of the future releases. </p>
+<h3>Integration testing suite</h3>
+<p>DTail comes already with some unit tests, but what's new is a full integration testing suite which covers all common use cases of all the commands (dtail, dcat, dgrep, dmap) with a server backend and also in serverless mode.</p>
+<p>How are the tests implemented? All integration tests are simply unit tests in the "./integrationtests" folder. They must be explicitly activated with:</p>
+<pre>
+% export DTAIL_INTEGRATION_TEST_RUN_MODE=yes
+</pre>
+<p>Once done, first compile all commands, and then run the integration tests:</p>
+<pre>
+% make
+.
+.
+.
+% go clean -testcache
+% go test -race -v ./integrationtests
+</pre>
+<h3>Improved code</h3>
+<p>Not that the code quality of DTail has been bad (I have been using Go vet and Go lint for previous releases and will keep using these), but this time I had new tools (such as SonarQube and BlackDuck) in my arsenal to:</p>
+<ul>
+<li>Reduce the complexity of a couple of functions (splitting code up into several smaller functions)</li>
+<li>Avoid repeating code (this version of DTail doesn't use Go generics yet, though).</li>
+</ul>
+<p>Other than that, a lot of other code has been refactored as I saw fit.</p>
+<h3>Use of memory pools</h3>
+<p>DTail makes excessive use of string builder and byte buffer objects. For performance reasons, those are now re-used from memory pools.</p>
+<h2>What's next</h2>
+<p>DTail 5 won't be released any time soon I guess, but some 4.x.y releases will follow this year fore sure. I can think of:</p>
+<ul>
+<li>New (but backwards compatible) features which don't require a new major version bump (some features have been requested at work internally).</li>
+<li>Even more improved documentation.</li>
+<li>Dependency updates.</li>
+</ul>
+<p>I use usually DTail at work, but I have recently installed it on my personal OpenBSD machines too. I might write a small tutorial here (and I might also add the rc scripts as examples to one of the next DTail releases).</p>
+<p>I am a bit busy at the moment with two other pet projects of mine (one internal work-project, and one personal one, the latter you will read about in the next couple of months). If you have ideas (or even a patch), then please don't hesitate to contact me (either via E-Mail or a request at GitHub).</p>
+<p>Thanks!</p>
+<p>Paul</p>
+<p>E-Mail me your comments to paul at buetow dot org!</p>
+<a class="textlink" href="../">Go back to the main site</a><br />
+<p class="footer">
+Generated with <a href="https://codeberg.org/foozone/gemtexter">Gemtexter</a> |
+served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> |
+<a href="https://www.foo.zone/site-mirrors.html">Site Mirrors</a>
+</p>
+</body>
+</html>
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index 1a09a851..5f65c021 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,12 +1,264 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2022-02-20T19:58:51+00:00</updated>
+ <updated>2022-03-06T18:11:39+00:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="https://foo.zone/gemfeed/atom.xml" rel="self" />
<link href="https://foo.zone/" />
<id>https://foo.zone/</id>
<entry>
+ <title>The release of DTail 4.0.0</title>
+ <link href="https://foo.zone/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html" />
+ <id>https://foo.zone/gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html</id>
+ <updated>2022-03-06T18:11:39+00:00</updated>
+ <author>
+ <name>Paul Buetow</name>
+ <email>comments@mx.buetow.org</email>
+ </author>
+ <summary>I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. You can also read my previous post about DTail in case you wonder what DTail is:. .....to read on please visit my site.</summary>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <h1>The release of DTail 4.0.0</h1>
+<pre>
+ ,_---~~~~~----._
+ _,,_,*^____ _____``*g*\"*,
+ ____ _____ _ _ / __/ /' ^. / \ ^@q f
+ | _ \_ _|_ _(_) | @f | @)) | | @)) l 0 _/
+ | | | || |/ _` | | | \`/ \~____ / __ \_____/ \
+ | |_| || | (_| | | | | _l__l_ I
+ |____/ |_|\__,_|_|_| } [______] I
+ ] | | | |
+ ] ~ ~ |
+ | |
+ | |
+</pre>
+<p class="quote"><i>Published by Paul at 2022-03-06</i></p>
+<p>I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. You can also read my previous post about DTail in case you wonder what DTail is:</p>
+<a class="textlink" href="https://foo.zone/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html">DTail - The distributed log tail program</a><br />
+<p>If you want to jump directly to DTail, do it here (there are nice animated gifs which demonstrates the usage pretty well):</p>
+<a class="textlink" href="https://dtail.dev">https://dtail.dev</a><br />
+<h2>So, what's new in 4.0.0?</h2>
+<h3>Rewritten logging</h3>
+<p>For DTail 4, logging has been completely rewritten. The new package name is "internal/io/dlog". I rewrote the logging because DTail is a special case here: There are logs processed by DTail, there are logs produced by the DTail server itself, there are logs produced by a DTail client itself, there are logs only logged by a DTail client, there are logs only logged by the DTail server, and there are logs logged by both, server and client. There are also different logging levels and outputs involved.</p>
+<p>As you can imagine, it becomes fairly complex. There is no ready Go off-shelf logging library which suits my needs and the logging code in DTail 3 was just one big source code file with global variables and it wasn't sustainable to maintain anymore. So why not rewrite it for profit and fun? </p>
+<p>There's a are new log level structure now (The log level now can be specified with the "-logLevel" command line flag):</p>
+<pre>
+// Available log levels.
+const (
+ None level = iota
+ Fatal level = iota
+ Error level = iota
+ Warn level = iota
+ Info level = iota
+ Default level = iota
+ Verbose level = iota
+ Debug level = iota
+ Devel level = iota
+ Trace level = iota
+ All level = iota
+)
+</pre>
+<p>DTail also supports multiple log outputs (e.g. to file or to stdout). More are now easily pluggable with the new logging package. The output can also be "enriched" (default) or "plain" (read more about that further below).</p>
+<h3>Configurable terminal color codes</h3>
+<p>A complaint I received from the users of DTail 3 were the terminal colors used for the output. Under some circumstances (terminal configuration) it made the output difficult to read so that users defaulted to "--noColor" (disabling colored output completely). I toke it by heart and also rewrote the color handling. It's now possible to configure the foreground and background colors and an attribute (e.g. dim, bold, ...).</p>
+<p>The example "dtail.json" configuration file represents the default (now, more reasonable default) color codes used, and it is free to the user to customize them:</p>
+<pre>
+{
+ "Client": {
+ "TermColorsEnable": true,
+ "TermColors": {
+ "Remote": {
+ "DelimiterAttr": "Dim",
+ "DelimiterBg": "Blue",
+ "DelimiterFg": "Cyan",
+ "RemoteAttr": "Dim",
+ "RemoteBg": "Blue",
+ "RemoteFg": "White",
+ "CountAttr": "Dim",
+ "CountBg": "Blue",
+ "CountFg": "White",
+ "HostnameAttr": "Bold",
+ "HostnameBg": "Blue",
+ "HostnameFg": "White",
+ "IDAttr": "Dim",
+ "IDBg": "Blue",
+ "IDFg": "White",
+ "StatsOkAttr": "None",
+ "StatsOkBg": "Green",
+ "StatsOkFg": "Black",
+ "StatsWarnAttr": "None",
+ "StatsWarnBg": "Red",
+ "StatsWarnFg": "White",
+ "TextAttr": "None",
+ "TextBg": "Black",
+ "TextFg": "White"
+ },
+ "Client": {
+ "DelimiterAttr": "Dim",
+ "DelimiterBg": "Yellow",
+ "DelimiterFg": "Black",
+ "ClientAttr": "Dim",
+ "ClientBg": "Yellow",
+ "ClientFg": "Black",
+ "HostnameAttr": "Dim",
+ "HostnameBg": "Yellow",
+ "HostnameFg": "Black",
+ "TextAttr": "None",
+ "TextBg": "Black",
+ "TextFg": "White"
+ },
+ "Server": {
+ "DelimiterAttr": "AttrDim",
+ "DelimiterBg": "BgCyan",
+ "DelimiterFg": "FgBlack",
+ "ServerAttr": "AttrDim",
+ "ServerBg": "BgCyan",
+ "ServerFg": "FgBlack",
+ "HostnameAttr": "AttrBold",
+ "HostnameBg": "BgCyan",
+ "HostnameFg": "FgBlack",
+ "TextAttr": "AttrNone",
+ "TextBg": "BgBlack",
+ "TextFg": "FgWhite"
+ },
+ "Common": {
+ "SeverityErrorAttr": "AttrBold",
+ "SeverityErrorBg": "BgRed",
+ "SeverityErrorFg": "FgWhite",
+ "SeverityFatalAttr": "AttrBold",
+ "SeverityFatalBg": "BgMagenta",
+ "SeverityFatalFg": "FgWhite",
+ "SeverityWarnAttr": "AttrBold",
+ "SeverityWarnBg": "BgBlack",
+ "SeverityWarnFg": "FgWhite"
+ },
+ "MaprTable": {
+ "DataAttr": "AttrNone",
+ "DataBg": "BgBlue",
+ "DataFg": "FgWhite",
+ "DelimiterAttr": "AttrDim",
+ "DelimiterBg": "BgBlue",
+ "DelimiterFg": "FgWhite",
+ "HeaderAttr": "AttrBold",
+ "HeaderBg": "BgBlue",
+ "HeaderFg": "FgWhite",
+ "HeaderDelimiterAttr": "AttrDim",
+ "HeaderDelimiterBg": "BgBlue",
+ "HeaderDelimiterFg": "FgWhite",
+ "HeaderSortKeyAttr": "AttrUnderline",
+ "HeaderGroupKeyAttr": "AttrReverse",
+ "RawQueryAttr": "AttrDim",
+ "RawQueryBg": "BgBlack",
+ "RawQueryFg": "FgCyan"
+ }
+ }
+ },
+ ...
+}
+</pre>
+<p>You notice the different sections - these are different contexts:</p>
+<ul>
+<li>Remote: Color configuration for all log lines sent remotely from the server to the client. </li>
+<li>Client: Color configuration for all lines produced by a DTail client by itself (e.g. status information).</li>
+<li>Server: Color configuration for all lines produced by the DTail server by itself and sent to the client (e.g. server warnings or errors)</li>
+<li>MaprTable: Color configuration for the map-reduce table output.</li>
+<li>Common: Common color configuration used in various places (e.g. when it's not clear what's the current context of a line).</li>
+</ul>
+<p>When you do so, make sure that you check your "dtail.json" against the JSON schema file. This is to ensure that you don't configure an invalid color accidentally (requires "jsonschema" to be installed on your computer). Furthermore, the schema file is also a good reference for all possible colors available:</p>
+<pre>
+jsonschema -i dtail.json schemas/dtail.schema.json
+</pre>
+<h3>Serverless mode</h3>
+<p>All DTail commands can now operate on log files (and other text files) directly without any DTail server running. So there isn't a need anymore to install a DTail server when you are on the target server already anyway, like the following example shows:</p>
+<pre>
+% dtail --files /var/log/foo.log
+</pre>
+<p>or</p>
+<pre>
+% dmap --files /var/log/foo.log --query 'from TABLE select .... outfile result.csv'
+</pre>
+<p>The way it works in Go code is that a connection to a server is managed through an interface and in serverless mode DTail calls through that interface to the server code directly without any TCP/IP and SSH connection made in the background. This means, that the binaries are a bit larger (also ship with the code which normally would be executed by the server) but the increase of binary size is not much.</p>
+<h3>Shorthand flags</h3>
+<p>The "--files" from the previous example is now redundant. As a shorthand, It is now possible to do the following instead:</p>
+<pre>
+% dtail /var/log/foo.log
+</pre>
+<p>Of course, this also works with all other DTail client commands (dgrep, dcat, ... etc).</p>
+<h3>Spartan (aka plain) mode</h3>
+<p>There's a plain mode, which makes DTail only print out the "plain" text of the files operated on (without any DTail specific enriched output). E.g.:</p>
+<pre>
+% dcat --plain /etc/passwd &gt; /etc/test
+% diff /etc/test /etc/passwd # Same content, no diff
+</pre>
+<p>This might be useful if you wanted to post-process the output. </p>
+<h3>Standard input pipe</h3>
+<p>In serverless mode, you might want to process your data in a pipeline. You can do that now too through an input pipe:</p>
+<pre>
+% dgrep --plain --regex 'somethingspecial' /var/log/foo.log |
+ dmap --query 'from TABLE select .... outfile result.csv'
+</pre>
+<p>Or, use any other "standard" tool:</p>
+<pre>
+% awk '.....' &lt; /some/file | dtail ....
+</pre>
+<h3>New command dtailhealth</h3>
+<p>Prior to DTail 4, there was a flag for the "dtail" command to check the health of a remote DTail server (for use with monitoring system such as Nagios). That has been moved out to a separate binary to reduce complexity of the "dtail" command. The following checks whether DTail is operational on the current machine (you could also check a remote instance of DTail server, just adjust the server address).</p>
+<pre>
+% cat check_dtail.sh
+#!/bin/sh
+
+exec /usr/local/bin/dtailhealth --server localhost:2222
+</pre>
+<h3>Improved documentation</h3>
+<p>Some features, such as custom log formats and the map-reduce query language, are now documented. Also, the examples have been updated to reflect the new features added. This also includes the new animated example Gifs (plus documentation how they were created).</p>
+<p>I must admit that not all features are documented yet:</p>
+<ul>
+<li>Server side scheduled map-reduce queries</li>
+<li>Server side continuous map-reduce queries</li>
+<li>Some more docs about terminal color customization</li>
+<li>Some more docs about log levels</li>
+</ul>
+<p>That will be added in one of the future releases. </p>
+<h3>Integration testing suite</h3>
+<p>DTail comes already with some unit tests, but what's new is a full integration testing suite which covers all common use cases of all the commands (dtail, dcat, dgrep, dmap) with a server backend and also in serverless mode.</p>
+<p>How are the tests implemented? All integration tests are simply unit tests in the "./integrationtests" folder. They must be explicitly activated with:</p>
+<pre>
+% export DTAIL_INTEGRATION_TEST_RUN_MODE=yes
+</pre>
+<p>Once done, first compile all commands, and then run the integration tests:</p>
+<pre>
+% make
+.
+.
+.
+% go clean -testcache
+% go test -race -v ./integrationtests
+</pre>
+<h3>Improved code</h3>
+<p>Not that the code quality of DTail has been bad (I have been using Go vet and Go lint for previous releases and will keep using these), but this time I had new tools (such as SonarQube and BlackDuck) in my arsenal to:</p>
+<ul>
+<li>Reduce the complexity of a couple of functions (splitting code up into several smaller functions)</li>
+<li>Avoid repeating code (this version of DTail doesn't use Go generics yet, though).</li>
+</ul>
+<p>Other than that, a lot of other code has been refactored as I saw fit.</p>
+<h3>Use of memory pools</h3>
+<p>DTail makes excessive use of string builder and byte buffer objects. For performance reasons, those are now re-used from memory pools.</p>
+<h2>What's next</h2>
+<p>DTail 5 won't be released any time soon I guess, but some 4.x.y releases will follow this year fore sure. I can think of:</p>
+<ul>
+<li>New (but backwards compatible) features which don't require a new major version bump (some features have been requested at work internally).</li>
+<li>Even more improved documentation.</li>
+<li>Dependency updates.</li>
+</ul>
+<p>I use usually DTail at work, but I have recently installed it on my personal OpenBSD machines too. I might write a small tutorial here (and I might also add the rc scripts as examples to one of the next DTail releases).</p>
+<p>I am a bit busy at the moment with two other pet projects of mine (one internal work-project, and one personal one, the latter you will read about in the next couple of months). If you have ideas (or even a patch), then please don't hesitate to contact me (either via E-Mail or a request at GitHub).</p>
+<p>Thanks!</p>
+<p>Paul</p>
+<p>E-Mail me your comments to paul at buetow dot org!</p>
+ </div>
+ </content>
+ </entry>
+ <entry>
<title>Computer operating systems I use(d)</title>
<link href="https://foo.zone/gemfeed/2022-02-04-computer-operating-systems-i-use.html" />
<id>https://foo.zone/gemfeed/2022-02-04-computer-operating-systems-i-use.html</id>
diff --git a/gemfeed/index.html b/gemfeed/index.html
index f1d5ebdb..6b743659 100644
--- a/gemfeed/index.html
+++ b/gemfeed/index.html
@@ -9,6 +9,7 @@
<body>
<h1>Gemfeed of foo.zone</h1>
<h2>To be in the .zone!</h2>
+<a class="textlink" href="./2022-03-06-the-release-of-dtail-4.0.0.html">2022-03-06 - The release of DTail 4.0.0</a><br />
<a class="textlink" href="./2022-02-04-computer-operating-systems-i-use.html">2022-02-04 - Computer operating systems I use(d)</a><br />
<a class="textlink" href="./2022-01-23-welcome-to-the-foo.zone.html">2022-01-23 - Welcome to the foo.zone</a><br />
<a class="textlink" href="./2022-01-01-bash-golf-part-2.html">2022-01-01 - Bash Golf Part 2</a><br />
diff --git a/gemfeed/style.css b/gemfeed/style.css
index 328ad6eb..d62b6ae8 100644
--- a/gemfeed/style.css
+++ b/gemfeed/style.css
@@ -2,12 +2,12 @@ body {
margin: auto;
padding-left: 11px;
padding-right: 11px;
- max-width: 900px;
background-color: #8fbc8f;
color: #ddddce;
font-family: Courier New, Courier, Lucida Sans Typewriter, Lucida Typewriter, monospace;
font-style: normal;
font-variant: normal;
+ max-width: 900px;
}
h1 {