aboutsummaryrefslogtreecommitdiffstats
path: root/src/LogInit.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-10-02Log: new logging library APIMax Kellermann1-7/+6
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-05mpd_error.h: remove obsolete headerMax Kellermann1-3/+3
Migrate the remaining callers to FatalError().
2013-09-05conf.h: remove obsolete headerMax Kellermann1-1/+3
Use only ConfigData.hxx in plugin sources to reduce header dependencies.
2013-09-04util/Error: new error passing libraryMax Kellermann1-18/+21
Replaces GLib's GError.
2013-08-07ConfigPath: return a Path objectMax Kellermann1-14/+20
Migrate all callers to use Path directly, instead of doing the conversion in each caller.
2013-08-07Makefile.am: move sources to libsystem.aMax Kellermann1-2/+2
2013-08-07FatalError: new library to replace mpd_error.hMax Kellermann1-2/+3
2013-08-04*: use gcc.h macros instead of GLibMax Kellermann1-2/+2
2013-01-30ConfigFile: add enum ConfigOptionMax Kellermann1-2/+1
Look up top-level config options by enum (= integer), not by name string.
2013-01-10Log, ...: include cleanupMax Kellermann1-1/+0
2013-01-09sig_handlers, log: convert to C++Max Kellermann1-2/+2
2012-08-14log: store duplicated path stringMax Kellermann1-28/+28
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-11-28log: print reason for failureMax Kellermann1-2/+2
2011-09-09conf: turn config_get_path() into config_dup_path()Max Kellermann1-4/+12
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.
2011-09-09log: print detailed errno message on open() failureMax Kellermann1-2/+2
2011-09-09log: return GError on initialization failureMax Kellermann1-9/+19
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-09-25eliminate g_error() usageThomas Jansen1-8/+9
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.
2010-05-08log: /dev/null doesn't exist on win32.Avuton Olrich1-0/+2
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-11-12include config.h in all sourcesMax Kellermann1-1/+1
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.
2009-11-10fd_util: removed creat_cloexec()Max Kellermann1-1/+1
Add a "mode" argument to open_cloexec() instead.
2009-11-07set the close-on-exec flag on all file descriptorsMax Kellermann1-1/+2
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.
2009-11-07log: redirect stdout/stderr to /dev/null if syslog is usedMax Kellermann1-1/+4
Don't hold a file descriptor on root's tty when syslog is used for logging.
2009-07-05log: fix double free() bug during shutdownMax Kellermann1-6/+2
Don't free an internal configuration value in log_init(). Call config_get_path() instead of manually calling parsePath().
2009-04-10log: removed "unused" attribute from log_level parameterMax Kellermann1-1/+1
2009-03-15log: removed DEBUG() and FATAL()Max Kellermann1-24/+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-19added G_LOG_DOMAIN macros to several librariesMax Kellermann1-0/+3
Define the GLib logging domain in the following libraries: conf, daemon, event_pipe, log.
2009-02-19log: added log_early_init() for early debug messagesMax Kellermann1-0/+9
2009-01-25conf: const pointers in block get functionsMax Kellermann1-3/+2
All config_get_block_*() functions should accept constant config_param pointers.
2009-01-17conf: no CamelCase, part IMax Kellermann1-3/+3
Renamed functions, types, variables.
2009-01-15log, pcm_convert: added return statements after g_error()Max Kellermann1-1/+3
gcc doesn't know that g_error() never returns. Work around the gcc warning.
2009-01-03log: don't call closelog() on !HAVE_SYSLOGMax Kellermann1-0/+2
2008-12-29log: removed unused logging wrappersMax Kellermann1-4/+0
Removed GLib logging wrappers which are not used anymore.
2008-12-29log: automatically append newlineMax Kellermann1-4/+19
If a log message does not include a newline character, append it.
2008-12-28Include <pthread.h> where it is necessary onlyThomas Jansen1-1/+0
2008-12-28log: use GLib loggingMax Kellermann1-13/+13
2008-12-28log: don't keep log file openMax Kellermann1-14/+15
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().
2008-12-28log: support syslog()Max Kellermann1-6/+103
Allow logging to syslog if log_file is configured to "syslog".
2008-12-28log: moved code to log_init_file()Max Kellermann1-15/+27
Added log_init_file() and log_init_stdout(), preparing for other logging targets.
2008-12-28log: merged initLog() and open_log_files().Max Kellermann1-6/+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-28log: moved code to parse_log_level()Max Kellermann1-15/+17
2008-12-28log: use the GLogLevelFlags typeMax Kellermann1-3/+3
Declare log_threshold as GLogLevelFlags.
2008-12-28log: don't manipulate the umaskMax Kellermann1-9/+1
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.
2008-12-28log: moved code to open_log_file()Max Kellermann1-12/+19
Merged code from open_log_files() and cycle_log_files().
2008-12-28log: deprecated "error_file" optionMax Kellermann1-26/+2
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.
2008-12-20log: map log level "SECURE" to GLib's "INFO"Max Kellermann1-3/+3
Make "secure" a log level different from "default". "secure" should be right between "default" and "verbose". Map "default" to Glib's "MESSAGE" log level.
2008-12-02replaced mpd_printf etc by G_GNUC_PRINTFThomas Jansen1-2/+2
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/+1
We want to remove gcc.h eventually. This takes care of all the G_GNUC_NORETURN macros.