/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.tools.IOtools;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.Date;

/**
 *
 * @author LH
 */
public class LogStream extends PrintStream
{

    public LogStream(File file) throws FileNotFoundException
    {
        super(file);
    }

    public LogStream(OutputStream out)
    {
        super(out);
    }

    public LogStream(String fileName) throws FileNotFoundException
    {
        super(fileName);
    }

    public LogStream(File file, String csn) throws FileNotFoundException, UnsupportedEncodingException
    {
        super(file, csn);
    }

    public LogStream(OutputStream out, boolean autoFlush)
    {
        super(out, autoFlush);
    }

    public LogStream(String fileName, String csn) throws FileNotFoundException, UnsupportedEncodingException
    {
        super(fileName, csn);
    }

    public LogStream(OutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException
    {
        super(out, autoFlush, encoding);
    }

    @Override
    public void println(String x)
    {
        super.println("["+new Date(System.currentTimeMillis()).toString()+"]"+x); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void println(Object x)
    {
        println(""+x);//timestamps
    }

    @Override
    public void println(int x)
    {
        println(""+x);//timestamps
    }
    
    
}
