Examples of LocationInfo


Examples of org.apache.log4j.spi.location.LocationInfo

      insertStatement.setString(5, event.getLevel().toString());
      insertStatement.setString(6, event.getNDC());
      insertStatement.setString(7, event.getThreadName());
      insertStatement.setShort(8, DBHelper.computeReferenceMask(event));

      LocationInfo li;

      if (event.locationInformationExists() || locationInfo) {
        li = event.getLocationInformation();
      } else {
        li = LocationInfo.NA_LOCATION_INFO;
      }

      insertStatement.setString(9, li.getFileName());
      insertStatement.setString(10, li.getClassName());
      insertStatement.setString(11, li.getMethodName());
      insertStatement.setString(12, li.getLineNumber());

      int updateCount = insertStatement.executeUpdate();
      if (updateCount != 1) {
        getLogger().warn("Failed to insert loggingEvent");
      }
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

    properties.put(Constants.APPLICATION_KEY, fileURL);

    //all remaining entries in fieldmap are properties
    properties.putAll(fieldMap);

    LocationInfo info = null;

    if ((eventFileName != null) || (className != null) || (methodName != null)
        || (lineNumber != null)) {
      info = new LocationInfo(eventFileName, className, methodName, lineNumber);
    } else {
      info = LocationInfo.NA_LOCATION_INFO;
    }

    LoggingEvent event = new LoggingEvent();
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

        insertStatement.setString(5, event.getLevel().toString());
        insertStatement.setString(6, event.getNDC());
        insertStatement.setString(7, event.getThreadName());
        insertStatement.setShort(8, DBHelper.computeReferenceMask(event));

        LocationInfo li;

        if (event.locationInformationExists() || locationInfo) {
          li = event.getLocationInformation();
        } else {
          li = LocationInfo.NA_LOCATION_INFO;
        }
        insertStatement.setString(9, li.getFileName());
        insertStatement.setString(10, li.getClassName());
        insertStatement.setString(11, li.getMethodName());
        insertStatement.setString(12, li.getLineNumber());

        //LogLog.info("*** performing insertion.");
        insertStatement.addBatch();
      }

View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

  }

  public StringBuffer convert(LoggingEvent event) {
    buf.setLength(0);

  LocationInfo locationInfo = event.getLocationInformation();
    if (locationInfo!=null) {
      buf.append(locationInfo.getFileName());
    }

    return buf;
  }
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

  }

  public StringBuffer convert(LoggingEvent event) {
    buf.setLength(0);

    LocationInfo locationInfo = event.getLocationInformation();
    if (locationInfo!=null) {
      buf.append(locationInfo.getMethodName());
    }

    return buf;
  }
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

  public ClassNamePatternConverter() {
    super();
  }
 
  String getFullyQualifiedName(LoggingEvent event) {
    LocationInfo li = event.getLocationInformation();
    if(li == null) {
      return LocationInfo.NA;
    } else {
      return li.getClassName();
    }
  }
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

  }

  public StringBuffer convert(LoggingEvent event) {
    buf.setLength(0);

    LocationInfo locationInfo = event.getLocationInformation();
    if (locationInfo!=null) {
      buf.append(locationInfo.getLineNumber());
    }

    return buf;
  }
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

          }
        }
      }
      Level levelImpl = Level.toLevel(level);
     
      LocationInfo info = null;
      if ((fileName != null) || (className != null) || (methodName != null) || (lineNumber != null)) {
          info = new LocationInfo(fileName, className, methodName, lineNumber);
      } else {
        info = LocationInfo.NA_LOCATION_INFO;
      }
      if (exception == null) {
          exception = new String[]{""};
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

  }

  public StringBuffer convert(LoggingEvent event) {
    buf.setLength(0);

    LocationInfo locationInfo = event.getLocationInformation();
    if (locationInfo!=null) {
      buf.append(locationInfo.getFullInfo());
    }

    return buf;
  }
View Full Code Here

Examples of org.apache.log4j.spi.location.LocationInfo

    Logger logger = Logger.getLogger(event.getLoggerName());
    String threadName = event.getThreadName();
    Object msg = escape(event.getMessage().toString());
    String ndc = event.getNDC();
//    Hashtable mdc = formatMDC(event);
    LocationInfo li = null;
    if (event.locationInformationExists()) {
        li = formatLocationInfo(event);
    }
    Hashtable properties = formatProperties(event);
    LoggingEvent copy = new LoggingEvent();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.