Package net.sf.jlogmicro.util.logging

Examples of net.sf.jlogmicro.util.logging.Logger


      pubDate = parseDcDate(date);
    } else {
      pubDate = parseStdDate(date);
    }
    //#ifdef DLOGGING
    Logger logger = Logger.getLogger("RssFormatParser");
    logger.finest("date,pubDate=" + date + "," + pubDate);
    //#endif
    return pubDate;
  }
View Full Code Here


                yearIndex = 4;
                timeIndex = 5;
                gmtIndex = 6;
            } else if( columnCount<5 || columnCount>6 ) {
        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("RssFormatParser");
        logger.warning("Invalid date format: " + dateString);
        //#endif
        for (int ic = 0; ic < dateString.length(); ic++) {
          System.out.println("date=" + ic + "," + dateString.charAt(ic) + "," + (int)dateString.charAt(ic));
        }
                throw new Exception("Invalid date format: " + dateString);
            }
           
            // Day of month
            int dayOfMonth = Integer.parseInt( values[ dayOfMonthIndex ] );
           
            // Month
            String[] months =  {
                "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
            String monthString = values[ monthIndex ];
            int month=0;
            for(int monthEnumIndex=0; monthEnumIndex<11; monthEnumIndex++) {
                if( monthString.equals( months[ monthEnumIndex ] )) {
                    month = monthEnumIndex;
                }
            }
           
            // Year
            int year = Integer.parseInt(values[ yearIndex ]);
            if(year<100) {
                year += 2000;
            }
           
            // Time
            String[] timeValues = StringUtil.split(values[ timeIndex ], ':');
            int hours = Integer.parseInt( timeValues[0] );
            int minutes = Integer.parseInt( timeValues[1] );
            int seconds = Integer.parseInt( timeValues[2] );
           
            pubDate = getCal(dayOfMonth, month, year, hours,
          minutes, seconds);
           
        } catch(Exception ex) {
            // TODO: Add exception handling code
            System.err.println("parseStdDate error while converting date string to object: " +
                    dateString + "," + ex.toString());
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssFormatParser");
      logger.severe("parseStdDate  error while converting date " +
               "string to object: " +
                    dateString, ex);
      //#endif
        } catch(Throwable t) {
            // TODO: Add exception handling code
            System.err.println("parseStdDate error while converting date string to object: " +
                    dateString + "," + t.toString());
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssFormatParser");
      logger.severe("parseStdDate  error while converting date " +
               "string to object: " +
                    dateString, t);
      //#endif
        }
        return pubDate;
View Full Code Here

            pubDate = getCal(dayOfMonth, month - 1 + Calendar.JANUARY, year,
          hours, minutes, seconds);
           
        } catch(Exception ex) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssFormatParser");
      logger.warning("parseDcDate error while converting date " +
               "string to object: " +
                    dateString, ex);
      //#endif
            // TODO: Add exception handling code
            System.err.println("parseDcDate error while converting date string to object: " +
                    dateString + "," + ex.toString());
        } catch(Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssFormatParser");
      logger.severe("parseDcDate error while converting date " +
               "string to object: " +
                    dateString, t);
      //#endif
            // TODO: Add exception handling code
            System.err.println("parseDcDate error while converting date string to object: " +
View Full Code Here

      throw e;
        } catch(Exception e) {
      CauseException ce = new CauseException(
          "Internal error while RssItunesItem unencodedDeserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(OutOfMemoryError e) {
      CauseMemoryException ce = new CauseMemoryException(
          "Out of memory error while RssItunesItem unencodedDeserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItunesItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        }
View Full Code Here

      throw e;
        } catch(Exception e) {
      CauseException ce = new CauseException(
          "Internal error while RssItunesItem deserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItunesItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(OutOfMemoryError e) {
      CauseMemoryException ce = new CauseMemoryException(
          "Out of memory error while RssItunesItem deserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItunesItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
    }
View Full Code Here

            --hi;
          }
        }

        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("com.substanceofcode.utilsSortUtil");
        logger.finest("lo,lo0,hi0,hi,mid=" + lo +"," + lo0 + "," + hi0 + "," + hi + "," + mid);
        /*
        if (finestLoggable) {
          for (int ic = lo0; ic < hi0; ic++) {
            logger.finer("ic,lngValues=" + ic +"," + lngValues[indexes[ic]);
          }
View Full Code Here

   * @author Irv Bunton
   */
  public static final Vector createWordList(final String text, final int width,
      final int height, final int colTxt, final int colTit) {
    //#ifdef DLOGGING
    Logger logger = Logger.getLogger( "RenderedWord");
      boolean finestLoggable = logger.isLoggable(Level.FINEST);
    if (finestLoggable){logger.finest("text=" + text);}
    //#endif
    final Vector wordList = new Vector();
    RenderedWord oldWord;
    final String tmpText = text.replace('\n', ' ');
    char[] ctmpText = tmpText.toCharArray();
    int apos = tmpText.indexOf('&');
    boolean ampPres;
    if (apos >= 0) {
      int spos = tmpText.indexOf(';');
      ampPres = (apos < spos);
    } else {
      ampPres = false;
    }
    int color = colTxt;
    int index = 0;
    final int lung = tmpText.length();
    int row = 0;
    int offset = 0;
    int style = 0;
    boolean fine = false;
    String tag = "";
    oldWord = null;
    while (!fine) {
      int spaceIndex;
      int tagIndex;
      int endTagIndex;
      String word = "";
      if (ctmpText[index] == ' ') {
        index++;
        if (index == lung) {
          fine = true;
        }
        word = " ";
      }
      else {
        if (ctmpText[index] == '<') {
          endTagIndex = tmpText.indexOf(">", index);
          if (endTagIndex < 0) {
            fine = true;
          }
          else {
            tag = tmpText.substring(index + 1, endTagIndex).toLowerCase(
                ).trim();
            int pos = tag.indexOf(" ");
            if (pos >= 0) {
              tag = tag.substring(0, pos);
            }
            int tagLen = tag.length();
            //#ifdef DTEST
            if (debug) {
              //#ifdef DLOGGING
              if (finestLoggable){logger.finest("tag,tagLen=" + tag + "," + tagLen);}
              //#endif
            }
            //#endif
            if (tagLen >= 1) {
              switch(tag.charAt(0)) {
View Full Code Here

      Exception e = new Exception("ResourceProviderME.get no value for " +
          "key=" + aKey);
      System.err.println(e.getMessage());
      e.printStackTrace();
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("ResourceProviderME");
      logger.severe(e.getMessage(), e);
      //#endif
      return aKey;
    }
    return tmpResult;
  }
View Full Code Here

      ((KFileSelectorImpl)newInst).init(midlet, title, defaultDir,
          iconDir);
      return (newInst);
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("KFileSelectorImpl");
      logger.severe("KFileSelectorFactory getInstance ", t);
      //#endif
      /** Error while executing constructor */
      System.out.println("KFileSelectorFactory getInstance " + t.getMessage());
      t.printStackTrace();
      return null;
View Full Code Here

      KFileSelector newInst = new KFileSelectorImpl();
      ((KFileSelectorImpl)newInst).init();
      return (newInst);
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("KFileSelectorImpl");
      logger.severe("KFileSelectorFactory getInstance ", t);
      //#endif
      /** Error while executing constructor */
      System.out.println("KFileSelectorFactory getInstance " + t.getMessage());
      t.printStackTrace();
      return null;
View Full Code Here

TOP

Related Classes of net.sf.jlogmicro.util.logging.Logger

Copyright © 2018 www.massapicom. 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.