Skip to content

Commit

Permalink
POI:Remove a superfluous/bloated log function, which String.format ca…
Browse files Browse the repository at this point in the history
…n do better and is only used once ...
  • Loading branch information
antony-liu committed Oct 29, 2019
1 parent fcd9ba7 commit 8dcfded
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 404 deletions.
5 changes: 2 additions & 3 deletions main/HSSF/Model/InternalSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace NPOI.HSSF.Model
public class InternalSheet
{

//private static POILogger log = POILogFactory.GetLogger(typeof(Sheet));
private static POILogger log = POILogFactory.GetLogger(typeof(InternalSheet));

int preoffset = 0; // offset of the sheet in a new file
protected int dimsloc = -1; // TODO - Is it legal for dims record to be missing?
Expand Down Expand Up @@ -829,8 +829,7 @@ public void AddValueRecord(int row, CellValueRecordInterface col)
/// <param name="col">a record supporting the CellValueRecordInterface.</param>
public void RemoveValueRecord(int row, CellValueRecordInterface col)
{
//log.LogFormatted(POILogger.DEBUG, "Remove value record row,dimsloc %,%",
// new int[] { row, dimsloc });
log.Log(POILogger.DEBUG, "Remove value record row " + row);
_rowsAggregate.RemoveCell(col);
}

Expand Down
132 changes: 0 additions & 132 deletions main/Util/NullLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,137 +336,5 @@ public override void Log(int level, Object obj1, Object obj2,
{
//do nothing
}

/**
* Logs a formated message. The message itself may contain %
* characters as place holders. This routine will attempt to match
* the placeholder by looking at the type of parameter passed to
* obj1.
*
* If the parameter is an array, it traverses the array first and
* matches parameters sequentially against the array items.
* Otherwise the parameters after <c>message</c> are matched
* in order.
*
* If the place holder matches against a number it is printed as a
* whole number. This can be overridden by specifying a precision
* in the form %n.m where n is the padding for the whole part and
* m is the number of decimal places to display. n can be excluded
* if desired. n and m may not be more than 9.
*
* If the last parameter (after flattening) is a Exception it is
* Logged specially.
*
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
* @param message The message to Log.
* @param obj1 The first object to match against.
*/

public override void LogFormatted(int level, String message,
Object obj1)
{
//do nothing
}

/**
* Logs a formated message. The message itself may contain %
* characters as place holders. This routine will attempt to match
* the placeholder by looking at the type of parameter passed to
* obj1.
*
* If the parameter is an array, it traverses the array first and
* matches parameters sequentially against the array items.
* Otherwise the parameters after <c>message</c> are matched
* in order.
*
* If the place holder matches against a number it is printed as a
* whole number. This can be overridden by specifying a precision
* in the form %n.m where n is the padding for the whole part and
* m is the number of decimal places to display. n can be excluded
* if desired. n and m may not be more than 9.
*
* If the last parameter (after flattening) is a Exception it is
* Logged specially.
*
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
* @param message The message to Log.
* @param obj1 The first object to match against.
* @param obj2 The second object to match against.
*/

public override void LogFormatted(int level, String message,
Object obj1, Object obj2)
{
//do nothing
}

/**
* Logs a formated message. The message itself may contain %
* characters as place holders. This routine will attempt to match
* the placeholder by looking at the type of parameter passed to
* obj1.
*
* If the parameter is an array, it traverses the array first and
* matches parameters sequentially against the array items.
* Otherwise the parameters after <c>message</c> are matched
* in order.
*
* If the place holder matches against a number it is printed as a
* whole number. This can be overridden by specifying a precision
* in the form %n.m where n is the padding for the whole part and
* m is the number of decimal places to display. n can be excluded
* if desired. n and m may not be more than 9.
*
* If the last parameter (after flattening) is a Exception it is
* Logged specially.
*
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
* @param message The message to Log.
* @param obj1 The first object to match against.
* @param obj2 The second object to match against.
* @param obj3 The third object to match against.
*/

public override void LogFormatted(int level, String message,
Object obj1, Object obj2,
Object obj3)
{
//do nothing
}

/**
* Logs a formated message. The message itself may contain %
* characters as place holders. This routine will attempt to match
* the placeholder by looking at the type of parameter passed to
* obj1.
*
* If the parameter is an array, it traverses the array first and
* matches parameters sequentially against the array items.
* Otherwise the parameters after <c>message</c> are matched
* in order.
*
* If the place holder matches against a number it is printed as a
* whole number. This can be overridden by specifying a precision
* in the form %n.m where n is the padding for the whole part and
* m is the number of decimal places to display. n can be excluded
* if desired. n and m may not be more than 9.
*
* If the last parameter (after flattening) is a Exception it is
* Logged specially.
*
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
* @param message The message to Log.
* @param obj1 The first object to match against.
* @param obj2 The second object to match against.
* @param obj3 The third object to match against.
* @param obj4 The forth object to match against.
*/

public override void LogFormatted(int level, String message,
Object obj1, Object obj2,
Object obj3, Object obj4)
{
//do nothing
}
}
}
Loading

0 comments on commit 8dcfded

Please sign in to comment.