[jcifs] Patch Suggestion

Hardy Cherry hcherry at xactware.com
Mon Apr 30 11:07:20 MDT 2012

We are investigating the use of jCIFS in one of our products. To monitor our error logs we use splunk which depends on each log having a timestamp.
Would it be possible to format the logs jCIFS creates so that they have a time stamp?

Here is my suggested change to the LogStream class:
Add an overrided version of println()

    public void println(String x)
       String newLine = System.getProperty("line.separator");
       //Format the error before printing it. Will look like this
       //Mon Apr 30 04:06:05 MDT 2012
       //  Source: jCIFS Error Logging
       //  ERROR: x
       super.println(new java.util.Date().toString() + newLine + "  Source: jCIFS Error Logging " + newLine + "  ERROR: " + x);



This email is intended solely for the recipient. It may contain privileged, proprietary or confidential information or material. If you are not the intended recipient, please delete this email and any attachments and notify the sender of the error.

More information about the jCIFS mailing list