public void run()
        {
            while(!timeToStop)
            {
                try
                {
                    // Sleep until midnight
                    Calendar now = Calendar.getInstance();
                    GregorianCalendar midnight =
                        new GregorianCalendar(now.get(Calendar.YEAR),
                                              now.get(Calendar.MONTH),
                                              now.get(Calendar.DAY_OF_MONTH),
                                              23,0);
                    midnight.add(Calendar.HOUR,1);
                    long sleeptime=
                        midnight.getTime().getTime()-
                        now.getTime().getTime();
                    if(log.isDebugEnabled())log.debug("Rollover sleep until "+midnight.getTime());
                    Thread.sleep(sleeptime);
                }
                catch(InterruptedException e)
                {
                    if (!timeToStop)
                        e.printStackTrace();
                }
                    
                synchronized(__rollovers)
                {
                    ListIterator iter = __rollovers.listIterator();
                    while (iter.hasNext())
                    {
                        WeakReference ref =
                            (WeakReference)iter.next();
                        RolloverFileOutputStream rfos =
                            (RolloverFileOutputStream)ref.get();

                        if (rfos==null)
                            iter.remove();
                        else
                        {
                            try
                            {
                                rfos.setFile();
                                rfos.removeOldFiles();
                            }
                            catch(IOException e)
                            {
                                if (!timeToStop)
                                    e.printStackTrace();
                            }
                        }
                    }
                }
            }
        }