12e32d6038
Plugins other than playbin are untested. Rygel is normally run as a desktop service under a user account. It doesn't behave like a system daemon. Since running as a desktop service doesn't make sense for OpenWrt, I've included an init script and made a crude change to send the output to syslog. Signed-off-by: Andy Leiserson <andy@leiserson.org> Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/packages@34528 3c298f89-4303-0410-b956-a3cf2f4a3e73
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
Take all the output and send it to syslog.
|
|
This isn't great, but it's better than sending it to the bitbucket, at least
|
|
for troubleshooting.
|
|
--- a/src/rygel/rygel-log-handler.vala
|
|
+++ b/src/rygel/rygel-log-handler.vala
|
|
@@ -56,6 +56,29 @@
|
|
private LogHandler () {
|
|
this.log_level_hash = new HashMap<string,LogLevelFlags> ();
|
|
|
|
+ string[] argv = { "/usr/bin/logger", "-t", "rygel" };
|
|
+ int logger_fd;
|
|
+
|
|
+ try {
|
|
+ GLib.Process.spawn_async_with_pipes (null, // working_directory
|
|
+ argv,
|
|
+ null, // envp
|
|
+ SpawnFlags.STDOUT_TO_DEV_NULL |
|
|
+ SpawnFlags.STDERR_TO_DEV_NULL,
|
|
+ null, // child_setup
|
|
+ null, // child_pid
|
|
+ out logger_fd, // standard_input
|
|
+ null, // standard_output
|
|
+ null); // standard_error
|
|
+
|
|
+ Posix.dup2 (logger_fd, Posix.STDOUT_FILENO);
|
|
+ Posix.dup2 (logger_fd, Posix.STDERR_FILENO);
|
|
+ Posix.close (logger_fd);
|
|
+ } catch (Error err) {
|
|
+ warning (_("Unable to send output to /usr/bin/logger: %s"),
|
|
+ err.message);
|
|
+ }
|
|
+
|
|
// Get the allowed log levels from the config
|
|
var config = MetaConfig.get_default ();
|
|
string log_levels;
|