//# 0 errors, 101 messages
//#
/*
    //#nulllogger.java:1:1: class: net.sourceforge.pebble.logging.NullLogger
    //#nulllogger.java:1:1: method: net.sourceforge.pebble.logging.NullLogger.net.sourceforge.pebble.logging.NullLogger__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.logging;

import net.sourceforge.pebble.domain.Blog;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Calendar;

/**
 * A no-op logger that can be used when Pebble logging isn't required, such
 * as when something like Apache provides the necessary logging already.
 *
 * @author    Simon Brown
 */
public class NullLogger extends AbstractLogger {

  /**
   * Creates a new instance associated with the specified blog.
   *                                                 
   * @param blog    a Blog instance
   */
  public NullLogger(Blog blog) {
    super(blog);
    //#nulllogger.java:54: method: void net.sourceforge.pebble.logging.NullLogger.net.sourceforge.pebble.logging.NullLogger(Blog)
    //#input(void net.sourceforge.pebble.logging.NullLogger(Blog)): blog
    //#input(void net.sourceforge.pebble.logging.NullLogger(Blog)): this
    //#output(void net.sourceforge.pebble.logging.NullLogger(Blog)): this.blog
    //#post(void net.sourceforge.pebble.logging.NullLogger(Blog)): this.blog == blog
    //#post(void net.sourceforge.pebble.logging.NullLogger(Blog)): init'ed(this.blog)
  }
    //#nulllogger.java:55: end of method: void net.sourceforge.pebble.logging.NullLogger.net.sourceforge.pebble.logging.NullLogger(Blog)

  /**
   * Logs a HTTP request.
   *
   * @param request   a HttpServletRequest
   */
  public void log(HttpServletRequest request, int status) {
  }
    //#nulllogger.java:63: method: void net.sourceforge.pebble.logging.NullLogger.log(HttpServletRequest, int)
    //#nulllogger.java:63: end of method: void net.sourceforge.pebble.logging.NullLogger.log(HttpServletRequest, int)

  /**
   * Called to start this logger.
   */
  public void start() {
  }
    //#nulllogger.java:69: method: void net.sourceforge.pebble.logging.NullLogger.start()
    //#nulllogger.java:69: end of method: void net.sourceforge.pebble.logging.NullLogger.start()

  /**
   * Called to stop this logger.
   */
  public void stop() {
  }
    //#nulllogger.java:75: method: void net.sourceforge.pebble.logging.NullLogger.stop()
    //#nulllogger.java:75: end of method: void net.sourceforge.pebble.logging.NullLogger.stop()

  /**
   * Gets a copy of the log file for a given year, month and day.
   *
   * @param year    the year to get entries for
   * @param month   the month to get entries for
   * @param day     the day to get entries for
   * @return    a String containing the contents of the requested log file
   */
  public String getLogFile(int year, int month, int day) {
    return "";
    //#nulllogger.java:86: method: String net.sourceforge.pebble.logging.NullLogger.getLogFile(int, int, int)
    //#output(String getLogFile(int, int, int)): return_value
    //#post(String getLogFile(int, int, int)): return_value == &""
    //#nulllogger.java:86: end of method: String net.sourceforge.pebble.logging.NullLogger.getLogFile(int, int, int)
  }

  /**
   * Gets the log for a given year, month and day.
   *
   * @param year    the year to get entries for
   * @param month   the month to get entries for
   * @param day     the day to get entries for
   * @return    a Log object
   */
  public Log getLog(int year, int month, int day) {
    return new Log(blog, new ArrayList());
    //#nulllogger.java:98: method: Log net.sourceforge.pebble.logging.NullLogger.getLog(int, int, int)
    //#input(Log getLog(int, int, int)): this
    //#input(Log getLog(int, int, int)): this.blog
    //#output(Log getLog(int, int, int)): new ArrayList(Log#1) num objects
    //#output(Log getLog(int, int, int)): new ArrayList(getLog#2) num objects
    //#output(Log getLog(int, int, int)): new Log(getLog#1) num objects
    //#output(Log getLog(int, int, int)): return_value.__Tag
    //#output(Log getLog(int, int, int)): return_value.blog
    //#output(Log getLog(int, int, int)): return_value.logEntries
    //#output(Log getLog(int, int, int)): return_value
    //#new obj(Log getLog(int, int, int)): new ArrayList(Log#1)
    //#new obj(Log getLog(int, int, int)): new ArrayList(getLog#2)
    //#new obj(Log getLog(int, int, int)): new Log(getLog#1)
    //#pre[2] (Log getLog(int, int, int)): init'ed(this.blog)
    //#post(Log getLog(int, int, int)): return_value == &new Log(getLog#1)
    //#post(Log getLog(int, int, int)): new ArrayList(Log#1) num objects == 0
    //#post(Log getLog(int, int, int)): new ArrayList(getLog#2) num objects == 1
    //#post(Log getLog(int, int, int)): new Log(getLog#1) num objects == 1
    //#post(Log getLog(int, int, int)): return_value.__Tag == net/sourceforge/pebble/logging/Log
    //#post(Log getLog(int, int, int)): return_value.blog == this.blog
    //#post(Log getLog(int, int, int)): init'ed(return_value.blog)
    //#post(Log getLog(int, int, int)): return_value.logEntries == &new ArrayList(getLog#2)
    //#unanalyzed(Log getLog(int, int, int)): Effects-of-calling:java.util.ArrayList
    //#nulllogger.java:98: end of method: Log net.sourceforge.pebble.logging.NullLogger.getLog(int, int, int)
  }

  /**
   * Gets the log summary information for the given year, month and day.
   *
   * @param year  the year to get entries for
   * @param month the month to get entries for
   * @param day   the day to get entries for
   * @return a LogSummary object
   */
  public LogSummary getLogSummary(int year, int month, int day) {
    Calendar cal = blog.getCalendar();
    //#nulllogger.java:110: method: LogSummary net.sourceforge.pebble.logging.NullLogger.getLogSummary(int, int, int)
    //#nulllogger.java:110: Warning: method not available
    //#    -- call on Calendar net.sourceforge.pebble.domain.Blog:getCalendar()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.logging.NullLogger
    //#    method: LogSummary getLogSummary(int, int, int)
    //#    unanalyzed callee: Calendar net.sourceforge.pebble.domain.Blog:getCalendar()
    //#input(LogSummary getLogSummary(int, int, int)): day
    //#input(LogSummary getLogSummary(int, int, int)): month
    //#input(LogSummary getLogSummary(int, int, int)): this
    //#input(LogSummary getLogSummary(int, int, int)): this.blog
    //#input(LogSummary getLogSummary(int, int, int)): year
    //#output(LogSummary getLogSummary(int, int, int)): new LogSummaryItem(getLogSummary#1) num objects
    //#output(LogSummary getLogSummary(int, int, int)): return_value.__Tag
    //#output(LogSummary getLogSummary(int, int, int)): return_value.blog
    //#output(LogSummary getLogSummary(int, int, int)): return_value.date
    //#output(LogSummary getLogSummary(int, int, int)): return_value.totalRequests
    //#output(LogSummary getLogSummary(int, int, int)): return_value
    //#new obj(LogSummary getLogSummary(int, int, int)): new LogSummaryItem(getLogSummary#1)
    //#pre[2] (LogSummary getLogSummary(int, int, int)): month >= -2_147_483_647
    //#pre[4] (LogSummary getLogSummary(int, int, int)): this.blog != null
    //#presumption(LogSummary getLogSummary(int, int, int)): net.sourceforge.pebble.domain.Blog:getCalendar(...)@110 != null
    //#post(LogSummary getLogSummary(int, int, int)): return_value == &new LogSummaryItem(getLogSummary#1)
    //#post(LogSummary getLogSummary(int, int, int)): new LogSummaryItem(getLogSummary#1) num objects == 1
    //#post(LogSummary getLogSummary(int, int, int)): return_value.__Tag == net/sourceforge/pebble/logging/LogSummaryItem
    //#post(LogSummary getLogSummary(int, int, int)): return_value.blog == this.blog
    //#post(LogSummary getLogSummary(int, int, int)): return_value.blog != null
    //#post(LogSummary getLogSummary(int, int, int)): init'ed(return_value.date)
    //#post(LogSummary getLogSummary(int, int, int)): return_value.totalRequests == 0
    //#unanalyzed(LogSummary getLogSummary(int, int, int)): Effects-of-calling:net.sourceforge.pebble.logging.LogSummary
    cal.set(Calendar.YEAR, year);
    cal.set(Calendar.MONTH, month-1);
    cal.set(Calendar.DAY_OF_MONTH, day);
    int totalRequests = 0;

    return new LogSummaryItem(blog, cal.getTime(), totalRequests);
    //#nulllogger.java:116: end of method: LogSummary net.sourceforge.pebble.logging.NullLogger.getLogSummary(int, int, int)
  }

}
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Descendant_Table[net/sourceforge/pebble/logging/NullLogger]
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLog()Lnet/sourceforge/pebble/logging/Log;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLog(II)Lnet/sourceforge/pebble/logging/Log;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLog(III)Lnet/sourceforge/pebble/logging/Log;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogFile()Ljava/lang/String;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogFile(II)Ljava/lang/String;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogFile(III)Ljava/lang/String;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary()Lnet/sourceforge/pebble/logging/LogSummary;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary(I)Lnet/sourceforge/pebble/logging/LogSummary;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary(II)Lnet/sourceforge/pebble/logging/LogSummary;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary(III)Lnet/sourceforge/pebble/logging/LogSummary;
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.log(Ljavax/servlet/http/HttpServletRequest;I)V
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.start()V
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.stop()V
    //#output(net.sourceforge.pebble.logging.NullLogger__static_init): net/sourceforge/pebble/logging/AbstractLogger.__Descendant_Table[net/sourceforge/pebble/logging/NullLogger]
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Descendant_Table[net/sourceforge/pebble/logging/NullLogger] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): net/sourceforge/pebble/logging/AbstractLogger.__Descendant_Table[net/sourceforge/pebble/logging/NullLogger] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLog()Lnet/sourceforge/pebble/logging/Log; == &net/sourceforge/pebble/logging/AbstractLogger.getLog
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLog(II)Lnet/sourceforge/pebble/logging/Log; == &net/sourceforge/pebble/logging/AbstractLogger.getLog
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLog(III)Lnet/sourceforge/pebble/logging/Log; == &getLog
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogFile()Ljava/lang/String; == &net/sourceforge/pebble/logging/AbstractLogger.getLogFile
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogFile(II)Ljava/lang/String; == &net/sourceforge/pebble/logging/AbstractLogger.getLogFile
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogFile(III)Ljava/lang/String; == &getLogFile
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary()Lnet/sourceforge/pebble/logging/LogSummary; == &net/sourceforge/pebble/logging/AbstractLogger.getLogSummary
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary(I)Lnet/sourceforge/pebble/logging/LogSummary; == &net/sourceforge/pebble/logging/AbstractLogger.getLogSummary
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary(II)Lnet/sourceforge/pebble/logging/LogSummary; == &net/sourceforge/pebble/logging/AbstractLogger.getLogSummary
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.getLogSummary(III)Lnet/sourceforge/pebble/logging/LogSummary; == &getLogSummary
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.log(Ljavax/servlet/http/HttpServletRequest;I)V == &log
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.start()V == &start
    //#post(net.sourceforge.pebble.logging.NullLogger__static_init): __Dispatch_Table.stop()V == &stop
    //#nulllogger.java:: end of method: net.sourceforge.pebble.logging.NullLogger.net.sourceforge.pebble.logging.NullLogger__static_init
    //#nulllogger.java:: end of class: net.sourceforge.pebble.logging.NullLogger
