ia64/xen-unstable

view tools/python/xen/xend/server/SrvXendLog.py @ 6552:a9873d384da4

Merge.
author adsharma@los-vmm.sc.intel.com
date Thu Aug 25 12:24:48 2005 -0700 (2005-08-25)
parents 112d44270733 fa0754a9f64f
children dfaf788ab18c
line source
1 #============================================================================
2 # This library is free software; you can redistribute it and/or
3 # modify it under the terms of version 2.1 of the GNU Lesser General Public
4 # License as published by the Free Software Foundation.
5 #
6 # This library is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 # Lesser General Public License for more details.
10 #
11 # You should have received a copy of the GNU Lesser General Public
12 # License along with this library; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14 #============================================================================
15 # Copyright (C) 2004, 2005 Mike Wray <mike.wray@hp.com>
16 #============================================================================
18 from xen.web import static
20 from xen.xend import XendRoot
22 from xen.web.SrvDir import SrvDir
24 class SrvXendLog(SrvDir):
25 """Xend log.
26 """
28 def __init__(self):
29 SrvDir.__init__(self)
30 logging = XendRoot.instance().get_logging()
31 self.logfile = static.File(logging.getLogFilename(), defaultType="text/plain")
32 self.logfile.type = "text/plain"
33 self.logfile.encoding = None
35 def render_GET(self, req):
36 return self.logfile.render(req)