All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vmlens.trace.agent.bootstrap.Logger Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.vmlens.trace.agent.bootstrap;

import java.io.PrintStream;

public class Logger {
	
	
	private static final PrintStream stream;
	
	static{
		
		String logFileName = System.getProperty("vmlensBootstrapLogFile");
		
		if(logFileName != null)
		{
			  PrintStream temp  = null;
			
			try{
				temp = new PrintStream(logFileName);
			
			}
			catch(Exception e)
			{
			
			}
			
			stream  = temp;
		}
		else
		{
			stream = null;
		}
		
		
		
	}

	
	
	public static void info(String message)
	{
		if( stream != null)
		{
			stream.println(message);
			stream.flush();
		}
	}
	
	
	
	
	public static void throwable(Throwable throwable)
	{
		if( stream != null)
		{
			throwable.printStackTrace(stream);
			stream.flush();
		}
	}
	
	
	
	
	
	
	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy