summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-30 13:53:24 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-30 13:53:24 +0000
commite735b91cd44e5dafb83ed4158a4c6721c0b289aa (patch)
tree5183c87b9e68977258a9de7df45e3214da36f995 /monitor.c
parent15f8220829f9a3e8911c81d1cdf662769987e37f (diff)
downloadqemu-e735b91cd44e5dafb83ed4158a4c6721c0b289aa.tar.gz
Allow changing log filename.
Close logfile when logging is disabled. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3035 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index a8db87040c..ed31d5031a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -406,6 +406,11 @@ static void do_screen_dump(const char *filename)
vga_hw_screen_dump(filename);
}
+static void do_logfile(const char *filename)
+{
+ cpu_set_log_filename(filename);
+}
+
static void do_log(const char *items)
{
int mask;
@@ -1213,6 +1218,8 @@ static term_cmd_t term_cmds[] = {
"device filename", "change a removable medium" },
{ "screendump", "F", do_screen_dump,
"filename", "save screen into PPM image 'filename'" },
+ { "logfile", "s", do_logfile,
+ "filename", "output logs to 'filename'" },
{ "log", "s", do_log,
"item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },
{ "savevm", "s?", do_savevm,