01: //==============================================================================
02: //===
03: //=== Logger
04: //===
05: //==============================================================================
06: //=== Copyright (C) 2001-2005 Food and Agriculture Organization of the
07: //=== United Nations (FAO-UN), United Nations World Food Programme (WFP)
08: //=== and United Nations Environment Programme (UNEP)
09: //===
10: //=== This program is free software; you can redistribute it and/or modify
11: //=== it under the terms of the GNU General Public License as published by
12: //=== the Free Software Foundation; either version 2 of the License, or (at
13: //=== your option) any later version.
14: //===
15: //=== This program is distributed in the hope that it will be useful, but
16: //=== WITHOUT ANY WARRANTY; without even the implied warranty of
17: //=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18: //=== General Public License for more details.
19: //===
20: //=== You should have received a copy of the GNU General Public License
21: //=== along with this program; if not, write to the Free Software
22: //=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23: //===
24: //=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
25: //=== Rome - Italy. email: geonetwork@osgeo.org
26: //==============================================================================
27:
28: package org.fao.geonet.kernel.schema;
29:
30: import java.io.File;
31: import jeeves.utils.Xml;
32:
33: //==============================================================================
34:
35: class Logger {
36: //---------------------------------------------------------------------------
37: //---
38: //--- Init
39: //---
40: //---------------------------------------------------------------------------
41:
42: //---------------------------------------------------------------------------
43: //---
44: //--- API methods
45: //---
46: //---------------------------------------------------------------------------
47:
48: public static void log(String message) {
49: //System.out.println(message);
50: //logSeparator();
51: }
52:
53: //---------------------------------------------------------------------------
54:
55: public static void log(String message, ElementInfo ei) {
56: String file = new File(ei.file).getName();
57:
58: //System.out.println(message);
59: //System.out.println("File is : " + file);
60: //System.out.println("Element is : \n" + Xml.getString(ei.element));
61: //logSeparator();
62: }
63:
64: //---------------------------------------------------------------------------
65: //---
66: //--- Private methods
67: //---
68: //---------------------------------------------------------------------------
69:
70: private static void logSeparator() {
71: System.out
72: .println("---------------------------------------------------------");
73: }
74: }
75:
76: //==============================================================================
|