<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/debug.h, branch talloc-2.4.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>debug: Add DEBUGLF macro with explicit location and function parameters.</title>
<updated>2022-07-15T14:25:37+00:00</updated>
<author>
<name>Pavel Filipenský</name>
<email>pfilipen@redhat.com</email>
</author>
<published>2022-06-19T13:40:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f0e0a95320019ce2b2eac6350d95ec1fb3b2d563'/>
<id>f0e0a95320019ce2b2eac6350d95ec1fb3b2d563</id>
<content type='text'>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>debug: Fix whitespace and a typo in debug.h</title>
<updated>2022-07-15T14:25:37+00:00</updated>
<author>
<name>Pavel Filipenský</name>
<email>pfilipen@redhat.com</email>
</author>
<published>2022-07-12T08:36:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8e2d05879eb701dad58d4f336c734c445527bed4'/>
<id>8e2d05879eb701dad58d4f336c734c445527bed4</id>
<content type='text'>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>debug: add DBG_DEV()</title>
<updated>2022-06-17T01:28:30+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2022-05-26T03:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=1a6890a94d23ad15bddd07f2ed1dc5fa68d4cef1'/>
<id>1a6890a94d23ad15bddd07f2ed1dc5fa68d4cef1</id>
<content type='text'>
This can be a useful macro when you are trying to track the behaviour
of one process out of the dozens that samba starts up, and when your
interest is in following it over time, not necessarily in a single
stack.

In DEVELOPER mode, if you call 'debug_developer_enable()' in the
process you're following, then any instances of DBG_DEV() will work
like DBG_ERR(), also adding ":DEV:12345:" where "12345" is the pid of
th current process.

Within debug.c itself, the macro always writes to stderr, because the
debug.c functions are not all reentrant.

When not in DEVELOPER MODE, the macro evaluates to nothing.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can be a useful macro when you are trying to track the behaviour
of one process out of the dozens that samba starts up, and when your
interest is in following it over time, not necessarily in a single
stack.

In DEVELOPER mode, if you call 'debug_developer_enable()' in the
process you're following, then any instances of DBG_DEV() will work
like DBG_ERR(), also adding ":DEV:12345:" where "12345" is the pid of
th current process.

Within debug.c itself, the macro always writes to stderr, because the
debug.c functions are not all reentrant.

When not in DEVELOPER MODE, the macro evaluates to nothing.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>util: Add new debug setting debug_no_stderr_redirect</title>
<updated>2022-06-16T12:42:35+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2022-06-07T03:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a8091bd0c565a3f14542731e642319dbb68b4786'/>
<id>a8091bd0c565a3f14542731e642319dbb68b4786</id>
<content type='text'>
CTDB doesn't want this redirection of stderr to the log file.  It
expects to be able to capture stderr of subprocesses and log them with
a header.  This redirection stops that from happening.

Unfortunately this has to be a negative option (i.e. "no" in the name)
so that the default of 0/false maintains existing behaviour.

Note that the default behaviour is sub-optimal because it causes raw
data (i.e. debug data without a header) to appear in the log.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CTDB doesn't want this redirection of stderr to the log file.  It
expects to be able to capture stderr of subprocesses and log them with
a header.  This redirection stops that from happening.

Unfortunately this has to be a negative option (i.e. "no" in the name)
so that the default of 0/false maintains existing behaviour.

Note that the default behaviour is sub-optimal because it causes raw
data (i.e. debug data without a header) to appear in the log.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug: update comments about setup_logging()</title>
<updated>2022-05-30T11:03:47+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2022-05-26T03:50:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3567f4130d8f6193014dc7a1e06c07ecd0c98970'/>
<id>3567f4130d8f6193014dc7a1e06c07ecd0c98970</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Mon May 30 11:03:47 UTC 2022 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Mon May 30 11:03:47 UTC 2022 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>debug: add debug_traceid_set/get() interface</title>
<updated>2022-05-10T17:31:31+00:00</updated>
<author>
<name>Pavel Filipenský</name>
<email>pfilipen@redhat.com</email>
</author>
<published>2022-05-08T19:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e48fc192d24a53db4209de262caec4d5b491952e'/>
<id>e48fc192d24a53db4209de262caec4d5b491952e</id>
<content type='text'>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug: fix trailing whitespace</title>
<updated>2022-05-10T17:31:31+00:00</updated>
<author>
<name>Pavel Filipenský</name>
<email>pfilipen@redhat.com</email>
</author>
<published>2022-05-08T19:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7dbb527751a1c8a7e5dbde95959220fbcb0a28e3'/>
<id>7dbb527751a1c8a7e5dbde95959220fbcb0a28e3</id>
<content type='text'>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Pavel Filipenský &lt;pfilipen@redhat.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug: Add debug_syslog_format setting</title>
<updated>2021-11-01T06:37:32+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2021-10-28T08:05:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5e1e9d74ab6f59a62ac8dae3239299a0ef334708'/>
<id>5e1e9d74ab6f59a62ac8dae3239299a0ef334708</id>
<content type='text'>
Without debug_hires_timestamp this produces a syslog style header
containing:

  "MON DD HH:MM:SS HOSTNAME PROGNAME[PID] "

With debug_hires_timestamp this produces a syslog style header
containing:

  "RFC5424-TIMESTAMP HOSTNAME PROGNAME[PID] "

All other settings are ignored.

This will be made visible via smb.conf in a subsequent commit.

This commit adds some simple hostname handling.  It avoids using
get_myname() from util.c because using that potentially pulls in all
manner of dependencies.  No real error handling is done.  In the worst
case debug_set_hostname() sets the hostname to a truncated version of
the given string.  Similarly, in an even weirder world,
ensure_hostname() sets the hostname to a truncation of "unknown".
Both of these are unlikely in all reasonable cases.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without debug_hires_timestamp this produces a syslog style header
containing:

  "MON DD HH:MM:SS HOSTNAME PROGNAME[PID] "

With debug_hires_timestamp this produces a syslog style header
containing:

  "RFC5424-TIMESTAMP HOSTNAME PROGNAME[PID] "

All other settings are ignored.

This will be made visible via smb.conf in a subsequent commit.

This commit adds some simple hostname handling.  It avoids using
get_myname() from util.c because using that potentially pulls in all
manner of dependencies.  No real error handling is done.  In the worst
case debug_set_hostname() sets the hostname to a truncated version of
the given string.  Similarly, in an even weirder world,
ensure_hostname() sets the hostname to a truncation of "unknown".
Both of these are unlikely in all reasonable cases.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Add debug_get_log_type() function</title>
<updated>2021-04-29T03:58:37+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2021-01-08T07:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c7b1d2d11cfc348e654375fc1e880bf4e1773b88'/>
<id>c7b1d2d11cfc348e654375fc1e880bf4e1773b88</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: set current_msg_{level,class} also during a DEBUGADD[C]() call</title>
<updated>2019-05-28T07:16:25+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2019-04-26T11:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0da12ff93d213ac742eeb865bfa5697ca8a2280a'/>
<id>0da12ff93d213ac742eeb865bfa5697ca8a2280a</id>
<content type='text'>
In some situations we use DEBUGADDC() in order to print out content
without a related debug header line.

This is important with the new per class logfile with:

 log level = 1 dsdb_json_audit:10@/var/log/samba/log.dsdb_json_audit

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13915

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some situations we use DEBUGADDC() in order to print out content
without a related debug header line.

This is important with the new per class logfile with:

 log level = 1 dsdb_json_audit:10@/var/log/samba/log.dsdb_json_audit

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13915

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
