Commits

tbrugz  committed 366fc9a

dumpers: better logging

  • Participants
  • Parent commits cda2803

Comments (0)

Files changed (2)

File src/tbrugz/sqldump/JAXBSchemaXMLSerializer.java

 			Marshaller m = jc.createMarshaller();
 			//XXX: property for formatting or not JAXB output?
 			//see: http://ws.apache.org/jaxme/release-0.3/manual/ch02s02.html
-			m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);		
-			m.marshal(schemaModel, new File(fileOutput));
-			log.info("xml schema model dumped to '"+fileOutput+"'");
+			m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+			File fout = new File(fileOutput);
+			m.marshal(schemaModel, fout);
+			log.info("xml schema model dumped to '"+fout.getAbsolutePath()+"'");
 		}
 		catch(Exception e) {
 			log.error("error dumping schema: "+e);

File src/tbrugz/sqldump/SchemaSerializer.java

 		}
 		
 		try {
-			ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fileOutput));
+			File fout = new File(fileOutput);
+			ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fout));
 			oos.writeObject(schemaModel);
 			oos.close();
-			log.info("schema model serialized to '"+fileOutput+"'");
+			log.info("schema model serialized to '"+fout.getAbsolutePath()+"'");
 		}
 		catch(IOException e) {
 			log.error("error dumping schema: "+e);