<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git, branch applog</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Handle log-rotation for the per-application logs.</title>
<updated>2023-04-06T18:42:22+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-03-30T05:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d478eb5eeb53a64b39ff44173fa4b4fd6e224158'/>
<id>d478eb5eeb53a64b39ff44173fa4b4fd6e224158</id>
<content type='text'>
This commit makes the per-applications logs (if set) partake in logfile
rotation. This occurs when the master unit process receives a SIGUSR1.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit makes the per-applications logs (if set) partake in logfile
rotation. This occurs when the master unit process receives a SIGUSR1.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add per-application logging.</title>
<updated>2023-04-06T18:42:22+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-03-30T04:53:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=dc0a2a721abe133974fa3c5a1afdc4345df640a3'/>
<id>dc0a2a721abe133974fa3c5a1afdc4345df640a3</id>
<content type='text'>
This adds main part of per-application logging.

Currently when running in the foreground, unit application processes
will send stdout to the current TTY and stderr to the unit log file.

That behaviour won't change.

When running as a daemon, unit application processes will send stdout to
/dev/null and stderr to the unit log file.

This commit allows to alter the latter case of unit running as a daemon,
by allowing applications to redirect stdout and/or stderr to specific
log files. This is done via two new application options, 'stdout' &amp;
'stderr', e.g

  "applications": {
      "myapp": {
          ...
          "stdout": "/path/to/log/unit/app/stdout.log",
          "stderr": "/path/to/log/unit/app/stderr.log"
      }
  }

These log files are created by the application processes themselves and
thus the log directories need to be writable by the user (and or group)
of the application processes.

E.g

  $ sudo mkdir -p /path/to/log/unit/app
  $ sudo chown APP_USER /path/to/log/unit/app

These need to be setup before starting unit with the above config.

NOTE:

You may or may not see stuff printed to stdout as stdout was
traditionally used by CGI applications to communicate with the
webserver.

Closes: &lt;https://github.com/nginx/unit/issues/197&gt;
Closes: &lt;https://github.com/nginx/unit/issues/846&gt;
Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds main part of per-application logging.

Currently when running in the foreground, unit application processes
will send stdout to the current TTY and stderr to the unit log file.

That behaviour won't change.

When running as a daemon, unit application processes will send stdout to
/dev/null and stderr to the unit log file.

This commit allows to alter the latter case of unit running as a daemon,
by allowing applications to redirect stdout and/or stderr to specific
log files. This is done via two new application options, 'stdout' &amp;
'stderr', e.g

  "applications": {
      "myapp": {
          ...
          "stdout": "/path/to/log/unit/app/stdout.log",
          "stderr": "/path/to/log/unit/app/stderr.log"
      }
  }

These log files are created by the application processes themselves and
thus the log directories need to be writable by the user (and or group)
of the application processes.

E.g

  $ sudo mkdir -p /path/to/log/unit/app
  $ sudo chown APP_USER /path/to/log/unit/app

These need to be setup before starting unit with the above config.

NOTE:

You may or may not see stuff printed to stdout as stdout was
traditionally used by CGI applications to communicate with the
webserver.

Closes: &lt;https://github.com/nginx/unit/issues/197&gt;
Closes: &lt;https://github.com/nginx/unit/issues/846&gt;
Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add nxt_file_stdout().</title>
<updated>2023-04-06T18:42:16+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-03-30T04:44:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=5fbc363fc2d2c7463072235d35a7a83b5bdab6c0'/>
<id>5fbc363fc2d2c7463072235d35a7a83b5bdab6c0</id>
<content type='text'>
This is analogous to the nxt_file_stderr() function and will be used in
a subsequent commit.

This function redirects stdout to a given file descriptor.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is analogous to the nxt_file_stderr() function and will be used in
a subsequent commit.

This function redirects stdout to a given file descriptor.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tools: use control socket and log file from running instance.</title>
<updated>2023-04-04T10:29:53+00:00</updated>
<author>
<name>Liam Crilly</name>
<email>liam.crilly@nginx.com</email>
</author>
<published>2023-04-04T10:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=c54331fa3d9597ba6bc85e7b7242981f00ed25c2'/>
<id>c54331fa3d9597ba6bc85e7b7242981f00ed25c2</id>
<content type='text'>
If unitd was started with an explicit path then unitc will use that
binary instead of the default PATH to obtain the default control socket
and log file locations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If unitd was started with an explicit path then unitc will use that
binary instead of the default PATH to obtain the default control socket
and log file locations.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove a useless assignment in nxt_mem_zone_alloc_pages().</title>
<updated>2023-04-03T13:53:04+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-03-15T03:48:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=485205712433611ee9939a869b4f734f824a177a'/>
<id>485205712433611ee9939a869b4f734f824a177a</id>
<content type='text'>
This was reported by the 'Clang Static Analyzer' as a 'dead nested
assignment'.

We assign prev_size then check if it's != 0 and if true we then set
prev_pages to page_size right shifted by two at the same time setting
prev_size to be right shifted by two (&gt;&gt;=), however page_size is never
used again so no need to set it here.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was reported by the 'Clang Static Analyzer' as a 'dead nested
assignment'.

We assign prev_size then check if it's != 0 and if true we then set
prev_pages to page_size right shifted by two at the same time setting
prev_size to be right shifted by two (&gt;&gt;=), however page_size is never
used again so no need to set it here.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent a possible NULL de-reference in nxt_job_create().</title>
<updated>2023-04-03T13:53:04+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-03-14T17:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=8a9e078e5427e2b72e178740f25cbcebb780b225'/>
<id>8a9e078e5427e2b72e178740f25cbcebb780b225</id>
<content type='text'>
We allocate 'job' we then have a check if it's not NULL and do stuff
with it, but then we accessed it outside this check.

Simply return if job is NULL.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We allocate 'job' we then have a check if it's not NULL and do stuff
with it, but then we accessed it outside this check.

Simply return if job is NULL.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove a useless assignment in nxt_fs_mkdir_all().</title>
<updated>2023-04-03T13:53:04+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2023-03-14T17:21:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=22993fe41a65b7fc4215f2378e1251c790db0ecc'/>
<id>22993fe41a65b7fc4215f2378e1251c790db0ecc</id>
<content type='text'>
This was reported by the 'Clang Static Analyzer' as a 'dead nested
assignment'.

We set end outside the loop but the first time we use it is to assign it
in the loop (not used anywhere else).

Further cleanup could be to reduce the scope of end by moving its
declaration inside the loop.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was reported by the 'Clang Static Analyzer' as a 'dead nested
assignment'.

We set end outside the loop but the first time we use it is to assign it
in the loop (not used anywhere else).

Further cleanup could be to reduce the scope of end by moving its
declaration inside the loop.

Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Packages: Used a stricter check for Amazon Linux 2023.</title>
<updated>2023-03-30T17:51:32+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2023-03-30T17:51:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=497b84c18f6b903fc5cc5dd05c50e4648d2db777'/>
<id>497b84c18f6b903fc5cc5dd05c50e4648d2db777</id>
<content type='text'>
Previously, findstring matched on amazonlinux2 too, breaking the build on that OS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, findstring matched on amazonlinux2 too, breaking the build on that OS.
</pre>
</div>
</content>
</entry>
<entry>
<title>Packages: fixed rpm builds after 817968931c58.</title>
<updated>2023-03-29T19:42:54+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2023-03-29T19:42:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=219b8363a4653e99bd1051532f66be7a6583a30d'/>
<id>219b8363a4653e99bd1051532f66be7a6583a30d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Packages: Added Amazon Linux 2023.</title>
<updated>2023-03-22T23:55:36+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2023-03-22T23:55:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=24243ecab3ed119b9c91664ccbe368e492c2efe7'/>
<id>24243ecab3ed119b9c91664ccbe368e492c2efe7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
