public static void WriteLog(String log){
        String dat_time_path="";
        StringBuilder sb = new StringBuilder();
        try
        {
            try
            {
                Calendar cal = new GregorianCalendar();
                String name_cal=new SimpleDateFormat("yyyyMMdd").format(cal.getTime());
                dat_time_path= "/home/terminal/Log/LogSystem/log"+name_cal+".txt";
                //dat_time_path= "/home/terminal/Log/print_query.txt";
                File Log_path = new File(dat_time_path);
                if (!Log_path.exists())
                {
                    try {
                        Log_path.createNewFile();
                    } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                }
                BufferedReader in = new BufferedReader(new FileReader( new File(dat_time_path).getAbsoluteFile()));
                String read_log;
                if (sb.length()>0)
                {
                    sb.delete(0,sb.length()-1);
                }
                while ((read_log = in.readLine()) != null)
                {
                    if (sb.length()>0)
                    {
                        sb.append(read_log);
                        sb.append("\n");
                    }
                }
                in.close();
            }
            catch(IOException e)
            {
                throw new RuntimeException(e);
            }
            PrintStream printStream = new PrintStream(new FileOutputStream(dat_time_path, true), true);
            printStream.println(sb + log);
            printStream.close();
        }
        catch (Exception e)
        {
            // TODO Auto-generated catch block
            //e.printStackTrace();
        }
    }