Revision 4809
Added by daigle over 15 years ago
src/edu/ucsb/nceas/metacat/MetacatReplication.java | ||
---|---|---|
181 | 181 |
|
182 | 182 |
server = ((String[])params.get("server"))[0]; |
183 | 183 |
if ( getServerCodeForServerName(server) == 0 ) { |
184 |
System.out.println("Action \"" + action +
|
|
184 |
logMetacat.debug("Action \"" + action +
|
|
185 | 185 |
"\" rejected for server: " + server); |
186 | 186 |
return; |
187 | 187 |
} else { |
188 |
System.out.println("Action \"" + action +
|
|
188 |
logMetacat.debug("Action \"" + action +
|
|
189 | 189 |
"\" accepted for server: " + server); |
190 | 190 |
} |
191 | 191 |
} |
... | ... | |
236 | 236 |
|
237 | 237 |
}// this is final else |
238 | 238 |
} catch (Exception e) { |
239 |
System.out.println("Error in MetacatReplication.handleGetOrPost: " +
|
|
239 |
logMetacat.error("Error in MetacatReplication.handleGetOrPost: " +
|
|
240 | 240 |
e.getMessage() ); |
241 | 241 |
return; |
242 | 242 |
} |
... | ... | |
525 | 525 |
//conn.close(); |
526 | 526 |
|
527 | 527 |
} catch(Exception e) { |
528 |
System.out.println("Error in " +
|
|
528 |
logMetacat.error("Error in " +
|
|
529 | 529 |
"MetacatReplication.handleServerControlRequest " + |
530 | 530 |
e.getMessage()); |
531 | 531 |
e.printStackTrace(System.out); |
... | ... | |
963 | 963 |
} |
964 | 964 |
catch(Exception e) |
965 | 965 |
{ |
966 |
System.out.println("error requesting file lock from MetacatReplication." +
|
|
966 |
logMetacat.error("error requesting file lock from MetacatReplication." +
|
|
967 | 967 |
"handleGetLockRequest: " + e.getMessage()); |
968 | 968 |
e.printStackTrace(System.out); |
969 | 969 |
} |
... | ... | |
1023 | 1023 |
} |
1024 | 1024 |
catch (Exception e) |
1025 | 1025 |
{ |
1026 |
System.out.println("error in " +
|
|
1026 |
logMetacat.error("error in " +
|
|
1027 | 1027 |
"metacatReplication.handlegetdocumentinforequest: " + |
1028 | 1028 |
e.getMessage()); |
1029 | 1029 |
} |
... | ... | |
1139 | 1139 |
}//try |
1140 | 1140 |
catch(Exception e) |
1141 | 1141 |
{ |
1142 |
System.out.println("error getting data file from MetacatReplication." +
|
|
1142 |
logMetacat.error("error getting data file from MetacatReplication." +
|
|
1143 | 1143 |
"handlGetDataFileRequest " + e.getMessage()); |
1144 | 1144 |
e.printStackTrace(System.out); |
1145 | 1145 |
}//catch |
... | ... | |
1701 | 1701 |
} |
1702 | 1702 |
catch(Exception e) |
1703 | 1703 |
{ |
1704 |
System.out.println("Error in MetacatReplication.getServer: " +
|
|
1704 |
logMetacat.error("Error in MetacatReplication.getServer: " +
|
|
1705 | 1705 |
e.getMessage()); |
1706 | 1706 |
} |
1707 | 1707 |
finally |
... | ... | |
1847 | 1847 |
} |
1848 | 1848 |
catch(Exception e) |
1849 | 1849 |
{ |
1850 |
System.out.println("error in replicationHandler.getHomeServer(): " +
|
|
1850 |
logMetacat.error("error in replicationHandler.getHomeServer(): " +
|
|
1851 | 1851 |
e.getMessage()); |
1852 | 1852 |
} |
1853 | 1853 |
finally |
... | ... | |
1987 | 1987 |
pw.println(dateString); |
1988 | 1988 |
pw.flush(); |
1989 | 1989 |
} catch (Exception e) { |
1990 |
System.out.println("error writing to replication log from "
|
|
1990 |
logMetacat.error("error writing to replication log from "
|
|
1991 | 1991 |
+ "MetacatReplication.replLog: " + e.getMessage()); |
1992 | 1992 |
// e.printStackTrace(System.out); |
1993 | 1993 |
} |
... | ... | |
2015 | 2015 |
} |
2016 | 2016 |
catch(Exception e) |
2017 | 2017 |
{ |
2018 |
System.out.println("error writing to replication error log from " +
|
|
2018 |
logMetacat.error("error writing to replication error log from " +
|
|
2019 | 2019 |
"MetacatReplication.replErrorLog: " + e.getMessage()); |
2020 | 2020 |
//e.printStackTrace(System.out); |
2021 | 2021 |
} |
... | ... | |
2060 | 2060 |
} |
2061 | 2061 |
catch(Exception e) |
2062 | 2062 |
{ |
2063 |
System.out.println("error in MetacatReplication.replToServer: " +
|
|
2063 |
logMetacat.error("error in MetacatReplication.replToServer: " +
|
|
2064 | 2064 |
e.getMessage()); |
2065 | 2065 |
} |
2066 | 2066 |
finally |
Also available in: Unified diff
Replace System.out.println statements with logMetacat statements.