ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/util/uk/org/iscream/cms/util/FormatName.java
(Generate patch)

Comparing projects/cms/source/util/uk/org/iscream/cms/util/FormatName.java (file contents):
Revision 1.8 by tdb, Wed Mar 14 23:25:29 2001 UTC vs.
Revision 1.12 by tdb, Tue May 29 17:02:35 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.org.iscream.util;
2 > package uk.org.iscream.cms.server.util;
3  
4   //---IMPORTS---
5   import java.util.Date;
# Line 64 | Line 64 | public class FormatName {
64       * @return The string to be written to the log.
65       */
66      public static String formatLogLine(String source, int verbosity, String message){
67 <        String date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, Locale.UK).format(new Date());
67 >        String date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new Date());
68          return "[" + date + "] [" + VERBOSITY_NAMES[verbosity] + "] " + source + ": " + message;
69      }
70  
71      /**
72 <     * If the class name begins with uk.org.iscream
72 >     * If the class name begins with uk.org.iscream.cms.server
73       * this method will trim it off, otherwise it
74       * leaves the string unchanged.
75       *
# Line 78 | Line 78 | public class FormatName {
78       * @return the tidy version of it
79       */
80      private static String tidyClassName(String className) {
81 <        if (className.startsWith("uk.org.iscream")) {
82 <            return className.substring(18);
81 >        String prefix = "uk.org.iscream.cms.server";
82 >        if (className.startsWith(prefix)) {
83 >            return className.substring(prefix.length()+1);
84          }
85          return className;
86      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines