Schmitz, Jeffrey A napisaĆ(a):
As I struggled a little with this, and I couldn't find a such an example
anywhere, I thought I'd post my simple custom transformer here. Please
take it with a grain of salt, I'm very new to this, so I'm sure there
are better ways, but this at least seems to work. Also, the log stuff
isn't required, but nice to have when debugging. It outputs the log
file to your tomcat (not your cocoon) directory.
And to the experts out there, please let me know of improvements I could
make to this basic setup...
public class Simpletrans extends AbstractSAXTransformer implements
CacheableProcessingComponent {
File logFile = new File("Simpletrans.log");
PrintStream log;
Please do not log any information this way. It's hacky and highly
unreliable. You should use Cocoon's standard functionality for logging.
so you should just log this way:
getLogger().debug("Bla bla bla");
The rest seems to look fine.
--
Grzegorz Kossakowski
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]