Coverage Report - at.ipsquare.commons.core.util.PerformanceLogFormatter
 
Classes in this File Line Coverage Branch Coverage Complexity
PerformanceLogFormatter
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright (C) 2013 Matthias Langer
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *         http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 
 17  
 package at.ipsquare.commons.core.util;
 18  
 
 19  
 /**
 20  
  * An interface for formatting log messages.
 21  
  * 
 22  
  * @see PerformanceLogger
 23  
  * @author Matthias Langer
 24  
  * @since 2.1.0
 25  
  */
 26  
 public interface PerformanceLogFormatter
 27  
 {
 28  
     /**
 29  
      * Formats a log message according to the given input.
 30  
      * 
 31  
      * @param from the point where performance logging was started (can be null in theory).
 32  
      * @param to the point where performance logging was stopped (can be null in theory).
 33  
      * @param millis the number of elapsed milliseconds.
 34  
      * @param message an optional message.
 35  
      * @return a string for logging.
 36  
      */
 37  
     String format(StackTraceElement from, StackTraceElement to, long millis, String message);
 38  
 }