package com.mason.server.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.mason.server.dao.jdo.LogDAO;

@Controller
@RequestMapping("/log")
public class LogController {

	private static LogDAO logDAO = new LogDAO();

	@RequestMapping(value = "/list", method = RequestMethod.GET)
	public String listProject(Model model) {
		model.addAttribute("logList", logDAO.getAll());
		return "log/logList";
	}

	@RequestMapping(value = "/clear", method = RequestMethod.GET)
	public String clear(Model model) {
		logDAO.clear();
		return "log/logList";
	} 

}
