Revision 2668
Added by sgarg almost 19 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
502 | 502 |
username = "public"; |
503 | 503 |
sess.setAttribute("username", username); |
504 | 504 |
} else { |
505 |
logMetacat.warn("The session is not new or "
|
|
506 |
+ " has sessionid parameter");
|
|
505 |
logMetacat.warn("The session is either old or "
|
|
506 |
+ "has sessionid parameter"); |
|
507 | 507 |
try { |
508 | 508 |
if (params.containsKey("sessionid")) { |
509 | 509 |
sess_id = ((String[]) params.get("sessionid"))[0]; |
... | ... | |
535 | 535 |
} |
536 | 536 |
|
537 | 537 |
username = (String) sess.getAttribute("username"); |
538 |
logMetacat.warn("The user name from session is: "
|
|
538 |
logMetacat.info("The user name from session is: "
|
|
539 | 539 |
+ username); |
540 | 540 |
password = (String) sess.getAttribute("password"); |
541 | 541 |
groupnames = (String[]) sess.getAttribute("groupnames"); |
... | ... | |
739 | 739 |
} |
740 | 740 |
|
741 | 741 |
String un = ((String[]) params.get("username"))[0]; |
742 |
logMetacat.warn("user " + un + " try to login");
|
|
742 |
logMetacat.warn("user " + un + " is trying to login");
|
|
743 | 743 |
String pw = ((String[]) params.get("password"))[0]; |
744 | 744 |
|
745 | 745 |
String qformat = "xml"; |
... | ... | |
1852 | 1852 |
+ needSchemaValidate); |
1853 | 1853 |
return needSchemaValidate; |
1854 | 1854 |
} |
1855 |
System.out.println("before get target line");
|
|
1855 |
logMetacat.info("before get target line");
|
|
1856 | 1856 |
String targetLine = getSchemaLine(xml); |
1857 |
System.out.println("after get target line");
|
|
1857 |
logMetacat.info("after get target line");
|
|
1858 | 1858 |
// to see if the second line contain some keywords |
1859 | 1859 |
if (targetLine != null |
1860 | 1860 |
&& (targetLine.indexOf(SCHEMALOCATIONKEYWORD) != -1 || targetLine |
... | ... | |
1993 | 1993 |
out.println("<error>"); |
1994 | 1994 |
out.println("Docid not specified."); |
1995 | 1995 |
out.println("</error>"); |
1996 |
logMetacat.error("Docid not specified for the document to be deleted."); |
|
1996 | 1997 |
} else { |
1997 | 1998 |
|
1998 | 1999 |
// delete the document from the database |
... | ... | |
2008 | 2009 |
out.println("<success>"); |
2009 | 2010 |
out.println("Document deleted."); |
2010 | 2011 |
out.println("</success>"); |
2012 |
logMetacat.warn("Document deleted."); |
|
2011 | 2013 |
} |
2012 | 2014 |
catch (AccessionNumberException ane) { |
2013 | 2015 |
response.setContentType("text/xml"); |
... | ... | |
2016 | 2018 |
//out.println("Error deleting document!!!"); |
2017 | 2019 |
out.println(ane.getMessage()); |
2018 | 2020 |
out.println("</error>"); |
2021 |
logMetacat.error("Document could not be deleted: " |
|
2022 |
+ ane.getMessage()); |
|
2019 | 2023 |
} |
2020 | 2024 |
} |
2021 | 2025 |
catch (Exception e) { |
... | ... | |
2024 | 2028 |
out.println("<error>"); |
2025 | 2029 |
out.println(e.getMessage()); |
2026 | 2030 |
out.println("</error>"); |
2031 |
logMetacat.error("Document could not be deleted: " |
|
2032 |
+ e.getMessage()); |
|
2027 | 2033 |
} |
2028 | 2034 |
} |
2029 | 2035 |
} |
src/edu/ucsb/nceas/metacat/DocumentImpl.java | ||
---|---|---|
2861 | 2861 |
String parserName = MetaCatUtil.getOption("saxparser"); |
2862 | 2862 |
parser = XMLReaderFactory.createXMLReader(parserName); |
2863 | 2863 |
if (ruleBase != null && ruleBase.equals(EML200)) { |
2864 |
logMetacat.warn("eml 2.0.0 parser"); |
|
2864 |
logMetacat.warn("Using eml 2.0.0 parser");
|
|
2865 | 2865 |
chandler = new Eml200SAXHandler(dbconn, action, docid, rev, |
2866 | 2866 |
user, groups, pub, serverCode, createDate, updateDate); |
2867 | 2867 |
chandler.setIsRevisionDoc(isRevision); |
... | ... | |
2886 | 2886 |
externalSchemaLocation); |
2887 | 2887 |
} |
2888 | 2888 |
} else if (ruleBase != null && ruleBase.equals(EML210)) { |
2889 |
logMetacat.warn("eml 2.1.0 parser"); |
|
2889 |
logMetacat.warn("Using eml 2.1.0 parser");
|
|
2890 | 2890 |
chandler = new Eml210SAXHandler(dbconn, action, docid, rev, |
2891 | 2891 |
user, groups, pub, serverCode, createDate, updateDate); |
2892 | 2892 |
chandler.setIsRevisionDoc(isRevision); |
... | ... | |
2923 | 2923 |
|
2924 | 2924 |
if (ruleBase != null && ruleBase.equals(SCHEMA) |
2925 | 2925 |
&& needValidation) { |
2926 |
logMetacat.warn("General schema parser"); |
|
2926 |
logMetacat.warn("Using General schema parser");
|
|
2927 | 2927 |
// turn on schema validation feature |
2928 | 2928 |
parser.setFeature(VALIDATIONFEATURE, true); |
2929 | 2929 |
parser.setFeature(NAMESPACEFEATURE, true); |
... | ... | |
2944 | 2944 |
|
2945 | 2945 |
} else if (ruleBase != null && ruleBase.equals(DTD) |
2946 | 2946 |
&& needValidation) { |
2947 |
logMetacat.warn("dtd parser"); |
|
2947 |
logMetacat.warn("Using dtd parser");
|
|
2948 | 2948 |
// turn on dtd validaton feature |
2949 | 2949 |
parser.setFeature(VALIDATIONFEATURE, true); |
2950 | 2950 |
eresolver = new DBEntityResolver(dbconn, |
... | ... | |
2953 | 2953 |
parser.setEntityResolver((EntityResolver) eresolver); |
2954 | 2954 |
parser.setDTDHandler((DTDHandler) dtdhandler); |
2955 | 2955 |
} else { |
2956 |
logMetacat.warn("other parser"); |
|
2956 |
logMetacat.warn("Using other parser");
|
|
2957 | 2957 |
// non validation |
2958 | 2958 |
parser.setFeature(VALIDATIONFEATURE, false); |
2959 | 2959 |
eresolver = new DBEntityResolver(dbconn, |
... | ... | |
3067 | 3067 |
private static void moveNodesToNodesRevision(DBConnection dbconn, |
3068 | 3068 |
long rootNodeId) throws Exception |
3069 | 3069 |
{ |
3070 |
logMetacat.warn("the root node id is "+rootNodeId+
|
|
3070 |
logMetacat.info("the root node id is "+rootNodeId+
|
|
3071 | 3071 |
" will be moved from xml_nodes to xml_node_revision table"); |
3072 | 3072 |
PreparedStatement pstmt = null; |
3073 | 3073 |
// Move the nodes from xml_nodes to xml_revisions table... |
src/edu/ucsb/nceas/metacat/AuthLdap.java | ||
---|---|---|
739 | 739 |
dc.close(); |
740 | 740 |
} |
741 | 741 |
catch (NamingException ne) { |
742 |
logMetacat.error("Naming Exception in AuthLdap.getGroups" +
|
|
742 |
logMetacat.warn("Naming Exception in AuthLdap.getGroups" +
|
|
743 | 743 |
ne.getExplanation() + ne.getMessage()); |
744 | 744 |
} |
745 | 745 |
} |
src/edu/ucsb/nceas/metacat/DBTransform.java | ||
---|---|---|
278 | 278 |
{ |
279 | 279 |
String key =(String)en.nextElement(); |
280 | 280 |
String value = ((String[])(param.get(key)))[0]; |
281 |
logMetacat.warn(key+" : "+value);
|
|
281 |
logMetacat.info(key+" : "+value);
|
|
282 | 282 |
transformer.setParameter(key, value); |
283 | 283 |
} |
284 | 284 |
} |
Also available in: Unified diff
Changes in log levels of some commands mentioned in the previos commit.