aboutsummaryrefslogtreecommitdiff
path: root/src/log.c
Commit message (Collapse)AuthorAge
* Switch from autotools to a custom build system adapted from Libav.Anton Khirnov2013-11-04
|
* conf: turn config_get_path() into config_dup_path()Max Kellermann2011-09-09
| | | | | | | | | config_get_path() was somewhat flawed, because it pretended to be a function, when it really had a side effect. The second flaw was that it did not return the parser error, instead it aborted the whole process, which is bad style. The new function returns a duplicated (modified) string that must be freed by the caller, and returns a GError on failure.
* log: print detailed errno message on open() failureMax Kellermann2011-09-09
|
* log: return GError on initialization failureMax Kellermann2011-09-09
|
* copyright year 2011Max Kellermann2011-01-29
|
* eliminate g_error() usageThomas Jansen2010-09-25
| | | | | | | | | | | | | | Replaced all occurrences of g_error() with MPD_ERROR() located in a new header file 'mpd_error.h'. This macro uses g_critical() to print the error message and then exits gracefully in contrast to g_error() which would internally call abort() to produce a core dump. The macro name is distinctive and allows to find all places with dubious error handling. The long-term goal is to get rid of MPD_ERROR() altogether. To facilitate the eventual removal of this macro it was added in a new header file rather than to an existing header file. This fixes #2995 and #3007.
* log: /dev/null doesn't exist on win32.Avuton Olrich2010-05-08
|
* Update copyright notices.Avuton Olrich2009-12-31
|
* include config.h in all sourcesMax Kellermann2009-11-12
| | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* fd_util: removed creat_cloexec()Max Kellermann2009-11-10
| | | | Add a "mode" argument to open_cloexec() instead.
* set the close-on-exec flag on all file descriptorsMax Kellermann2009-11-07
| | | | | | | | | | | Added the "fd_util" library, which attempts to use the new thread-safe Linux system calls pipe2(), accept4() and the options O_CLOEXEC, SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is not thread safe. This is particularly important for the "pipe" output plugin (and others, such as JACK/PulseAudio), because we were heavily leaking file descriptors to child processes.
* log: redirect stdout/stderr to /dev/null if syslog is usedMax Kellermann2009-11-07
| | | | | Don't hold a file descriptor on root's tty when syslog is used for logging.
* log: fix double free() bug during shutdownMax Kellermann2009-07-05
| | | | | Don't free an internal configuration value in log_init(). Call config_get_path() instead of manually calling parsePath().
* log: removed "unused" attribute from log_level parameterMax Kellermann2009-04-10
|
* log: removed DEBUG() and FATAL()Max Kellermann2009-03-15
| | | | Use GLib the logging functions g_debug(), g_error() instead.
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | 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.
* added G_LOG_DOMAIN macros to several librariesMax Kellermann2009-02-19
| | | | | Define the GLib logging domain in the following libraries: conf, daemon, event_pipe, log.
* log: added log_early_init() for early debug messagesMax Kellermann2009-02-19
|
* conf: const pointers in block get functionsMax Kellermann2009-01-25
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* conf: no CamelCase, part IMax Kellermann2009-01-17
| | | | Renamed functions, types, variables.
* log, pcm_convert: added return statements after g_error()Max Kellermann2009-01-15
| | | | | gcc doesn't know that g_error() never returns. Work around the gcc warning.
* log: don't call closelog() on !HAVE_SYSLOGMax Kellermann2009-01-03
|
* log: removed unused logging wrappersMax Kellermann2008-12-29
| | | | Removed GLib logging wrappers which are not used anymore.
* log: automatically append newlineMax Kellermann2008-12-29
| | | | If a log message does not include a newline character, append it.
* Include <pthread.h> where it is necessary onlyThomas Jansen2008-12-28
|
* log: use GLib loggingMax Kellermann2008-12-28
|
* log: don't keep log file openMax Kellermann2008-12-28
| | | | | | The log file is duped to STDOUT_FILENO and STDERR_FILENO. No need to keep another copy of it in out_fd all the time. We only need it once once in setup_log_output().
* log: support syslog()Max Kellermann2008-12-28
| | | | Allow logging to syslog if log_file is configured to "syslog".
* log: moved code to log_init_file()Max Kellermann2008-12-28
| | | | | Added log_init_file() and log_init_stdout(), preparing for other logging targets.
* log: merged initLog() and open_log_files().Max Kellermann2008-12-28
| | | | | | The logging library currently has 3 constructor functions: initLog(), open_log_files(), setup_log_output(), called in this order. Merged the first two.
* log: moved code to parse_log_level()Max Kellermann2008-12-28
|
* log: use the GLogLevelFlags typeMax Kellermann2008-12-28
| | | | Declare log_threshold as GLogLevelFlags.
* log: don't manipulate the umaskMax Kellermann2008-12-28
| | | | | | | | If the user wants the log files with a specific mode, he has to start MPD with the correct umask. Don't hard-code that. This fixes a bug: when log cycling failed, MPD would not restore the old umask.
* log: moved code to open_log_file()Max Kellermann2008-12-28
| | | | Merged code from open_log_files() and cycle_log_files().
* log: deprecated "error_file" optionMax Kellermann2008-12-28
| | | | | Removed the "error_file" option. There is only one log file now. If a user wants to see only the errors, he should configure a log_level.
* log: map log level "SECURE" to GLib's "INFO"Max Kellermann2008-12-20
| | | | | | Make "secure" a log level different from "default". "secure" should be right between "default" and "verbose". Map "default" to Glib's "MESSAGE" log level.
* replaced mpd_printf etc by G_GNUC_PRINTFThomas Jansen2008-12-02
| | | | | We want to remove gcc.h eventually. This takes care of all the G_GNUC_PRINTF macros.
* replaced mpd_noreturn by G_GNUC_NORETURNThomas Jansen2008-12-02
| | | | | We want to remove gcc.h eventually. This takes care of all the G_GNUC_NORETURN macros.
* log: print the log_domainMax Kellermann2008-11-21
|
* log: check the log threshold in log_func()Max Kellermann2008-11-14
| | | | | The threshold was only checked in the deprecated logging functions (ERROR(), WARNING(), ...). Add the check to the GLib logging handler.
* log: properly check log_thresholdDaniel Schömer2008-11-09
|
* log: check if log_charset is setMax Kellermann2008-11-05
| | | | | When logging to a file, log_charset would be NULL and g_convert() would abort.
* log: convert messages to system charsetMax Kellermann2008-11-05
| | | | | When logging to the terminal, we should print messages in the system character set. Convert all messages in this case.
* log: use boolMax Kellermann2008-11-05
| | | | Use the bool data type for flags.
* log: provide a GLib logging handlerMax Kellermann2008-11-05
| | | | | Install a default handler which writes to stdout or stderr, and prepends a time stamp. This looks just like the 0.13.x logger.
* log: use GLib message loggingMax Kellermann2008-11-05
| | | | | | The logging functions from log.h are deprecated, and the code should use GLib logging instead. Make ERROR(), WARNING() etc. call g_logv() internally.
* log: no CamelCaseMax Kellermann2008-11-05
| | | | Renamed the variable "logLevel" to "log_threshold".
* log: removed warning bufferMax Kellermann2008-11-05
| | | | | 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.
* log: don't use utils.hMax Kellermann2008-10-29
| | | | Prefer GLib over utils.h.
* don't include os_compat.hMax Kellermann2008-10-08
| | | | | When there are standardized headers, use these instead of the bloated os_compat.h.