<commit_before>/*
*ALMA - Atacama Large Millimiter Array
* (c) Associated Universities Inc., 2007 
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
* 
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/
/** 
 * @author  nbarriga
 * @version $Id: testLTSClient.java,v 1.1 2007/02/21 09:38:05 nbarriga Exp $
 * @since    
 */

package alma.acs.loggingtstest;

import java.util.logging.Logger;
import alma.acs.component.client.ComponentClient;
import alma.ACSLogTypeExample.*;

/**
 * Insert a Class/Interface comment.
 * 
 */

public class testLTSClient  extends ComponentClient
{ 
	/**
	 * @param logger
	 * @param managerLoc
	 * @param clientName
	 * @throws Exception
	 */
	public testLTSClient(Logger logger, String managerLoc, String clientName) throws Exception
	{
		super(logger, managerLoc, clientName);
	}

	public static void main(String[] args) {
		String managerLoc = System.getProperty("ACS.manager");
		if (managerLoc == null)
		{
			System.out.println("Java property 'ACS.manager' must be set to the corbaloc of the ACS manager!");
			System.exit(-1);
		}
		String clientName = "testLTSClient";
		testLTSClient client = null;

		try
		{
			client = new testLTSClient(null, managerLoc, clientName);
		}
		catch (Exception e)
		{
			e.printStackTrace(System.err);
			System.exit(-1);
		}
		simpleLog slog=new simpleLog(client.m_logger);
		slog.log();		
		complexLog clog=new complexLog(client.m_logger);
		clog.setsomeDoubleMember(3.14159);
		clog.setsomeStringMember("test string");
		clog.setsomeLongMember((long)42);
		clog.log();		
		try
		{
			Thread.sleep(2000);
		}
		catch (Exception e)
		{
			// bad luck
			e.printStackTrace(System.err);
                        System.exit(-1);
		}

	}




}<commit_msg>javadoc & some formatting<commit_after>/*
*ALMA - Atacama Large Millimiter Array
* (c) Associated Universities Inc., 2007 
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
* 
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/
/** 
 * @author  nbarriga
 * @version $Id: testLTSClient.java,v 1.2 2007/07/06 08:57:51 hsommer Exp $
 * @since    
 */

package alma.acs.loggingtstest;

import java.util.logging.Logger;

import alma.ACSLogTypeExample.complexLog;
import alma.ACSLogTypeExample.simpleLog;
import alma.acs.component.client.ComponentClient;

/**
 * The test is based on TAT comparing with the reference output the log records sent by this class
 * and then received and printed by {@link alma.acs.logclient.LogListener}.
 * This is why we need to have the ACS manager available, to give access to the Log service. 
 */
public class testLTSClient extends ComponentClient
{ 
	public testLTSClient(Logger logger, String managerLoc, String clientName) throws Exception
	{
		super(logger, managerLoc, clientName);
	}

	
	public static void main(String[] args) {
		try {
			String managerLoc = System.getProperty("ACS.manager");
			if (managerLoc == null) {
				System.out.println("Java property 'ACS.manager' must be set to the corbaloc of the ACS manager!");
				System.exit(-1);
			}

			testLTSClient client = new testLTSClient(null, managerLoc, "testLTSClient");			
			Logger logger = client.m_logger;
			
			simpleLog slog=new simpleLog(logger);
			slog.log();		
			
			complexLog clog=new complexLog(logger);
			clog.setsomeDoubleMember(3.14159);
			clog.setsomeStringMember("test string");
			clog.setsomeLongMember((long)42);
			clog.log();
			
			Thread.sleep(2000);
		}
		catch (Throwable thr) {
			// bad luck
			thr.printStackTrace();
			System.exit(-1);
		}
	}

}
{'fraction_non_alphanumeric': 0.0971608832807571, 'fraction_numerical': 0.02124079915878023, 'mean_word_length': 3.7895266868076534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '832950', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1414, 'n_words': 504}