aboutsummaryrefslogtreecommitdiffstats
path: root/src/LogInit.hxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-01Copyright year 2015Max Kellermann1-1/+1
2014-01-13copyright year 2014Max Kellermann1-1/+1
2013-10-02Log: new logging library APIMax Kellermann1-2/+2
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04util/Error: new error passing libraryMax Kellermann1-11/+2
Replaces GLib's GError.
2013-08-04*: use gcc.h macros instead of GLibMax Kellermann1-1/+3
2013-07-30include cleanupMax Kellermann1-1/+0
2013-01-09sig_handlers, log: convert to C++Max Kellermann1-3/+3
2012-08-14log: store duplicated path stringMax Kellermann1-2/+3
Don't free the string right after calling log_init_file(). Add a new function log_deinit() that frees the string on shutdown. This fixes cycling the log file after SIGHUP (Mantis ticket 0003524).
2011-09-09log: return GError on initialization failureMax Kellermann1-1/+9
2011-01-29copyright year 2011Max Kellermann1-1/+1
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-03-15log: removed DEBUG() and FATAL()Max Kellermann1-3/+0
Use GLib the logging functions g_debug(), g_error() instead.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-02-19log: added log_early_init() for early debug messagesMax Kellermann1-0/+11
2008-12-29log: removed unused logging wrappersMax Kellermann1-4/+0
Removed GLib logging wrappers which are not used anymore.
2008-12-28log: merged initLog() and open_log_files().Max Kellermann1-3/+1
The logging library currently has 3 constructor functions: initLog(), open_log_files(), setup_log_output(), called in this order. Merged the first two.
2008-12-02replaced mpd_printf etc by G_GNUC_PRINTFThomas Jansen1-8/+6
We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
2008-12-02replaced mpd_noreturn by G_GNUC_NORETURNThomas Jansen1-1/+2
We want to remove gcc.h eventually. This takes care of all the G_GNUC_NORETURN macros.
2008-11-05log: use boolMax Kellermann1-3/+5
Use the bool data type for flags.
2008-11-05log: use GLib message loggingMax Kellermann1-4/+0
The logging functions from log.h are deprecated, and the code should use GLib logging instead. Make ERROR(), WARNING() etc. call g_logv() internally.
2008-11-05log: removed warning bufferMax Kellermann1-2/+0
The warning buffer is a complex piece of code for no good reason. Remove it and find a better solution, e.g. open the log file earlier.
2008-10-31added prefix to header macrosMax Kellermann1-2/+2
"LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
2008-10-08CPP include cleanupMax Kellermann1-2/+0
Include only headers which are really used.
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-2/+1
This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-08-27export FATAL() with noreturn attributeEric Wong1-1/+1
This attribute was set in log.c, but not exported to other modules in log.h This allows us to remove some unneccessary variable initializations that were added in r6277. I did audioOutput_shout.c a bit differently, to avoid some jumps. before: $ size src/mpd text data bss dec hex filename 225546 4040 14600 244186 3b9da src/mpd after: $ size src/mpd text data bss dec hex filename 224698 4040 14600 243338 3b68a src/mpd git-svn-id: https://svn.musicpd.org/mpd/trunk@6821 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong1-2/+1
I'm checking for zero-size allocations and assert()-ing them, so we can more easily get backtraces and debug problems, but we'll also allow -DNDEBUG people to live on the edge if they wish. We do not rely on errno when checking for OOM errors because some implementations of malloc do not set it, and malloc is commonly overridden by userspace wrappers. I've spent some time looking through the source and didn't find any obvious places where we would explicitly allocate 0 bytes, so we shouldn't trip any of those assertions. We also avoid allocating zero bytes because C libraries don't handle this consistently (some return NULL, some not); and it's dangerous either way. git-svn-id: https://svn.musicpd.org/mpd/trunk@4690 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20Fix warnings for -Wmissing-prototypesAvuton Olrich1-1/+1
Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-12always support DEBUG() logging, even if -DNDEBUGWarren Dukes1-6/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4613 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01logging cleanupsEric Wong1-16/+16
* Moved all logging-related stuff into log.c (and not myfprintf.c) * ISO C90-compliant strftime usage: %e and %R replaced with %d and %H:%M respectively * Got rid of variadic macros since some old-school compilers don't like them * compiling with -DNDEBUG disables the DEBUG() macro git-svn-id: https://svn.musicpd.org/mpd/trunk@4512 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30remove deprecated myfprintf wrapperEric Wong1-5/+7
This shaves another 5-6k because we've removed the paranoid fflush() calls after every fprintf. Now we only fflush() when we need to git-svn-id: https://svn.musicpd.org/mpd/trunk@4493 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-2/+1
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-12Add WARNING log method. it's the same as ERROR, except that when mpd starts,Warren Dukes1-1/+10
warnings are buffered until the error log is opened, and then flushed to the error log. git-svn-id: https://svn.musicpd.org/mpd/trunk@1442 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-29forte C++ compile fixesWarren Dukes1-6/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@1226 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-18bunch of autotool cleanupsWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-25cleanup logging, need to be careful with SECURE and DEBUGWarren Dukes1-12/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@58 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-25a few cleanupsWarren Dukes1-2/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@53 09075e82-0dd4-0310-85a5-a0d7c8717e4f