Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In order to help provide better information for my other question about browsers and Pulse audio, I wanted to see if I could get some kind of helpful log information.

However, there doesn't seem to be any log file in /var/log related to Pulse audio, at least not that I can see, and maybe not by default.

Can I get some kind of log output I can turn on, either from my browser, or from Pulse audio (which is using a network server) so I can see if there are any errors or helpful messages?

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

This is an excerpt from man pulseaudio

   --log-level[=LEVEL]
          If an argument is passed, set the log  level  to  the  specified
          value, otherwise increase the configured verbosity level by one.
          The log levels are numerical  from  0  to  4,  corresponding  to
          error,  warn,  notice, info, debug. Default log level is notice,
          i.e. all log messages with lower log levels are printed:  error,
          warn, notice.

   -v     Increase  the configured verbosity level by one (see --log-level
          above). Specify multiple times to increase  log  level  multiple
          times.

   --log-target={auto,syslog,stderr}
          Specify  the  log target. If set to auto (which is the default),
          then logging is directed to syslog when --daemonize  is  passed,
          otherwise to STDERR.

So, to answer your question. No, by default it does not have a log, it sends its log output to syslog as a daemon (when its running in the background), or to STDERR when its run in the terminal (aka, you see the output in the terminal.

You have three options (potentially) to get the log information you need in one nice package:

  • Use it in the terminal

  • See (and upvote :P) the other answer for a good trick for filtering out the pulseaudio output from syslog.

or

  • Trying changing the --log-target= to a new log file (located in /var/log/ I'm assuming. You probably want to create an empty file first). I haven't tried this, so it might not work...

For either option you can also pass -v or --log-level= to get more debugging info if needed.

Edit: I just realized that it is a pain to try and pass arguments to pulseaudio as it autospawns a new daemon immediately whenever you kill it. Instead....

To change the default log behavior without turning off autospawn:

edit /etc/pulse/daemon.conf (with sudo permissions) and uncomment and modify these log settings as desired.

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

To turn off autospawn so you can run it in a terminal:

try editing /etc/pulse/client.conf (also with sudo permissions) and uncommenting ; autospawn = yes and changing the yes to no. I haven't tested this so I don't know if it will work.

After disabling autospawn kill the daemon with pulseaudio --kill and start it again pulseaudio (with any options you want to pass). Hope this works!

share|improve this answer
    
Thanks for answering. Sorry I'm a little lost. Pulseaudio starts automatically every time I log in. So, to change the log level, do I have to stop the service and start it again? –  Dave M G May 27 '12 at 10:57
    
Yeah sorry, I forgot that pulseaudio autospawns. Edited my answer with a couple workarounds for this. –  adempewolff May 27 '12 at 11:03
    
That seems to do it. I'm now getting pulseaudio logs within syslog. –  Dave M G May 27 '12 at 11:05
    
Glad to help. If you still need more (or less) detailed logging, pay attention to the information about log levels 0-4 from the manpage and what the levels correspond to. 4 will probably give you too much information but it could be necessary to catch a really tricky bug. –  adempewolff May 27 '12 at 11:08
add comment

I've been able to find some output from Pulse Audio in syslog. I don't think Pulse Audio has some seperate log file. If you want to debug it, you'd probably need to disable the autorespaw (the process always automatically getting restarted whenever it crashes), launch it with the verbose parameter, and log the output.

Anyway, this is how I found some output: cat /var/log/syslog* | grep -i pulse

share|improve this answer
    
Thanks for that code. Unfortunately, it didn't return anything for me, which I think just means that Pulseaudio isn't generating any output. –  Dave M G May 27 '12 at 10:58
1  
+1 and linked to your answer from mine. As I doubt pulseaudio can take a custom log for --log-target= I think the best solution is using my answer to customize the level of logging and verify it is being sent to syslog and then use your answer to comb for the results. –  adempewolff May 27 '12 at 11:16
add comment

In the meanwhile, pulseaudio 3.0 can log to files.

From the pulseaudio --help output:

--log-target={auto,syslog,stderr,file:PATH,newfile:PATH}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.