summaryrefslogtreecommitdiff
path: root/lib/util/debug.c
AgeCommit message (Collapse)AuthorFilesLines
2012-06-11debug: Do not constantly rename logs when max log size = 0Andrew Bartlett1-16/+18
In Samba4, the max log size parameter is not yet connected, so maxlog is 0 This means that we would, on receipt of a -HUP, have all child processes attempt a rename. Now we have the -HUP mean we reopen the logs unconditionally, and then we see if the log is too large (samba3 mode) or simply proceed assuming that someone else has renamed the logs for us. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jun 11 13:34:43 CEST 2012 on sn-devel-104
2012-06-01Remove an unused variable.Jeremy Allison1-3/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jun 1 03:03:12 CEST 2012 on sn-devel-104
2012-03-08lib/util: Add a callback facility for debug messagesAndrew Bartlett1-13/+44
This will allow dlz_bind9 to put log messages somewhere useful, which may make it easier to debug. Andrew Bartlett
2012-03-04change low FDs are handled in SambaAndrew Bartlett1-3/+8
We now only close fds 0, 1, 2 when we are a forked daemon, and take care not to close a file descriptor that we might need for foreground stdin monitoring. This should fix stdout logging in the lsa and epmapper deamons (ie in make test). Andrew Bartlett
2011-11-16lib/util/debug: with log level = 10 we should be more verboseStefan Metzmacher1-3/+9
log level = 10 already impacts performance, so we can turn on more details and print the pid, [e][u|g]id and class information. So it implies "debug pid = yes", "debug uid = yes" and "debug class = yes". This generates a lot more useful log files. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Nov 16 12:25:02 CET 2011 on sn-devel-104
2011-07-20debug: log early messages to stdout, and keep it openAndrew Bartlett1-0/+6
The --log-stdout option was compromised by the log file descriptors being closed once the file process forked. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-13lib/util/ Fix crash bug caused by gfree_debug()Andrew Bartlett1-1/+1
The issue is that we should reset the debug_num_classes to 0 when we un-initialise the debug system. Andrew Bartlett
2011-04-04debug: default debug to stderr Andrew Tridgell1-1/+2
if setup_logging() hasn't been called then default to sending debug to stderr Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-31debug: Restore the s3-style check in check_log_size()Volker Lendecke1-1/+6
This has caused me considerable grief. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Mar 31 19:42:38 CEST 2011 on sn-devel-104
2011-03-29debug: ignore debug_set_logfile() with a blank stringAndrew Tridgell1-1/+5
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Mar 29 07:03:58 CEST 2011 on sn-devel-104
2011-03-04debug: fixed a valgrind errorAndrew Tridgell1-1/+4
Thanks to Volker for spotting this one! Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Mar 4 03:09:52 CET 2011 on sn-devel-104
2011-03-01lib/util: new merged debug systemAndrew Bartlett1-0/+1059
This is the s3 debug system, with a number of changes to tidy it up for common use. The debug class system is simplified by the removal of the ISSET table, the system no longer attempts to cope with assignment of DEBUGLEVEL, and the full class table is always available (rather than just DEBUGLEVEL_CLASS[DBCG_ALL]) from startup. It is also no longer confusingly described as a hack, but as the initial table. Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Mar 1 04:32:12 CET 2011 on sn-devel-104
2011-03-01lib/util move debug.[ch] out of the wayAndrew Bartlett1-273/+0
This will allow a modified version of the s3 debug system to be the new common debug system. Andrew Bartlett
2010-11-24lib/debug Add clarifying commentsAndrew Bartlett1-2/+2
2010-11-04debug: fixed default debug settingsAndrew Tridgell1-0/+2
this fixes -d in our command line tools (eg. samba-tool) Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Nov 4 01:48:15 UTC 2010 on sn-devel-104
2010-11-02debug Explain the behaviour of setup_logging() more clearlyAndrew Bartlett1-1/+7
2010-11-02lib/debug Use vdprintf rather than manually allocateAndrew Bartlett1-5/+1
This allows the system to use whatever buffers it wants for the string rather than assuming we need to malloc() it. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Nov 2 00:18:43 UTC 2010 on sn-devel-104
2010-11-01lib/util Remove setup_logging_stdout()Andrew Bartlett1-9/+0
This API is no longer required now that we don't attempt to build ndrdump with the s3 build system, and because the s3 debug system will soon have the same setup_logging() API. Andrew Bartlett
2010-04-02debug: enable talloc loggingAndrew Tridgell1-0/+12
we want to ensure talloc warnings are printed in the log
2009-06-29Fix ndrdump to use a common setup_logging() APIAndrew Bartlett1-0/+8
By adding a new common setup_logging_stdout() API, we no longer need to abuse the ABI compatability between the different setup_logging() calls in Samba3 and Samba4's DEBUG() subsystems. The revert of 49a6d757b4d944cd22c91b2838beb83f04fbe1e9 works with this to fix bug 6211. Andrew Bartlett
2009-06-11Fix build of recurusion fix in reopen_logs()Andrew Bartlett1-1/+1
2009-06-11Don't recurse in reopen_logs().Andrew Bartlett1-0/+6
Use the state to avoid recursion in reopen_logs(), as DEBUG() can call this function. Andrew Bartlett
2009-02-02lib/util: s/class/dclassStefan Metzmacher1-1/+1
metze
2008-10-20Provide two symbols to allow ndrdump compiled by Samba 3 to be used forJelmer Vernooij1-0/+1
Samba 4.
2008-10-19Fix segfault when using DEBUG() in the merged build.Jelmer Vernooij1-1/+4
2008-10-11Move lib/util from source4 to top-level libutil.Jelmer Vernooij1-0/+248
Conflicts: source4/Makefile