summaryrefslogtreecommitdiffstats
path: root/qemu-log.c
Commit message (Collapse)AuthorAgeFilesLines
* qemu-log: default to stderr for logging outputPeter Maydell2013-02-261-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Switch the default for qemu_log logging output from "/tmp/qemu.log" to stderr. This is an incompatible change in some sense, but logging is mostly used for debugging purposes so it shouldn't affect production use. The previous behaviour can be obtained by adding "-D /tmp/qemu.log" to the command line. This change requires us to: * update all the documentation/help text (we take the opportunity to smooth out minor inconsistencies between the phrasing in linux-user/bsd-user/system help messages) * make linux-user and bsd-user defer to qemu-log for the default logging destination rather than overriding it themselves * ensure that all logfile closing is done via qemu_log_close() and that that function doesn't close stderr as well as the obvious change to the behaviour of do_qemu_set_log() when no logfile name has been specified. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1361901160-28729-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-log: Rename CPULogItem, cpu_log_items to QEMULogItem, qemu_log_itemsPeter Maydell2013-02-161-6/+6
| | | | | | | | | | Rename the typedef CPULogItem and the public array cpu_log_items to names that better reflect the fact that the qemu_log functionality isn't restricted to TCG CPU debug logs any more. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: Rename the public-facing cpu_set_log function to qemu_set_logPeter Maydell2013-02-161-2/+2
| | | | | | | | | | Rename the public-facing function cpu_set_log to qemu_set_log. This requires us to rename the internal-only qemu_set_log() to do_qemu_set_log(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_maskPeter Maydell2013-02-161-1/+1
| | | | | | | | | | Rename cpu_str_to_log_mask() to qemu_str_to_log_mask(), since the qemu_log functionality is no longer restricted to TCG CPU debug logging. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: Abstract out "print usage message about valid log categories"Peter Maydell2013-02-161-0/+9
| | | | | | | | | | | | Abstract out the "print a human readable list of all the valid log categories" functionality which is currently duplicated in three separate places. (We leave the monitor.c help_cmd() implementation as-is since it wants to send the message to the monitor and add its own information.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filenamePeter Maydell2013-02-161-1/+1
| | | | | | | | | | The qemu_log() functionality is no longer specific to TCG CPU debug logs. Rename cpu_set_log_filename() to qemu_set_log_filename() and drop the pointless wrapper set_cpu_log_filename(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: Plug trivial memory leak in cpu_set_log_filename()Markus Armbruster2013-01-301-4/+9
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-log: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster2013-01-301-1/+1
| | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-log: Add new log category for guest bugsPeter Maydell2012-10-201-0/+3
| | | | | | | | | | | | Add a new category for device models to log guest behaviour which is likely to be a guest bug of some kind (accessing nonexistent registers, reading 32 bit wide registers with a byte access, etc). Making this its own log category allows those who care (mostly guest OS authors) to see the complaints without bothering most users. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: fix x86 and user loggingBlue Swirl2012-07-141-19/+13
| | | | | | | | | | | | 5726c27fa913296aafab9f50b912cea5b3709271 broke x86 specific options and user emulation specific stdio buffering. Always enable all log items. They may not be useful for non-x86 targets, but there's no harm either. Fix user emulation buffering by passing around a flag. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: add log category for unimplemented functionalityBlue Swirl2012-06-211-0/+2
| | | | | | Add new log category (LOG_UNIMP) for unimplemented functionality. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: cleanupBlue Swirl2012-06-211-16/+38
| | | | | | | | Don't use global variables directly but via accessor functions. Rename globals. Convert macros to functions, add GCC format attributes. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-log: move logging to qemu-log.cBlue Swirl2012-06-211-0/+146
Move logging functions from exec.c to qemu-log.c, compile it only once. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud