<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: AcsLogRecord.java,v 1.4 2007/07/10 12:51:21 nbarriga Exp $
 * @since    
 */

package alma.acs.logging;

import java.util.logging.Level;
import java.util.logging.LogRecord;

/**
 * As of ACS 6.0.2, this special LogRecord is only produced by the generated type-safe logs
 * (module loggingts) which automatically set the target audience.
 * <p>
 * Note that in the above scenario of type-safe logs, non-JDK logging data is attached to special fields in a custom log record,
 * which is then logged to a normal JDK logger. 
 * In the standard logging scenario it is the other way around: we use a custom logger, which creates standard LogRecords, and
 * special non-JDK data is attached in the form of special property-style log parameters.
 * @TODO- It may be better to unify the two approaches of storing non-JDK log data.   
 */
public class AcsLogRecord extends LogRecord
{
	private String audience;
	private String array;
	private String antenna;

	private Object params[];

	public AcsLogRecord(Level level, String msg, Object parameters, String loggerName) {
		super(level, msg);
		this.setLoggerName(loggerName);
		params = new Object[1];
		params[0] = parameters;
		this.setParameters(params);
	}

	public void setAudience(String audience) {
		this.audience = audience;
	}

	public String getAudience() {
                if(this.audience!=null)
    		    return this.audience;
                else
                    return "";
	}
        
	public void setArray(String array) {
		this.array = array;
	}

	public String getArray() {
                if(this.array!=null)
		    return this.array;
                else
                    return "";            
	}
        
	public void setAntenna(String antenna) {
		this.antenna = antenna;
	}

	public String getAntenna() {
                if(this.antenna!=null)
		    return this.antenna;
                else
                    return "";
	}
        
}
<commit_msg>added ctor w/o "parameters" Object, since now this class gets used also for non-typesafe logging.<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: AcsLogRecord.java,v 1.5 2007/07/17 13:03:56 hsommer Exp $
 * @since    
 */

package alma.acs.logging;

import java.util.logging.Level;
import java.util.logging.LogRecord;

/**
 * As of ACS 6.0.2, this special LogRecord is only produced by the generated type-safe logs
 * (module loggingts) which automatically set the target audience.
 * <p>
 * Note that in the above scenario of type-safe logs, non-JDK logging data is attached to special fields in a custom log record,
 * which is then logged to a normal JDK logger. 
 * In the standard logging scenario it is the other way around: we use a custom logger, which creates standard LogRecords, and
 * special non-JDK data is attached in the form of special property-style log parameters.
 * @TODO- It may be better to unify the two approaches of storing non-JDK log data.   
 */
public class AcsLogRecord extends LogRecord
{
	private String audience;
	private String array;
	private String antenna;

	private Object params[];

	public AcsLogRecord(Level level, String msg, String loggerName) {
		super(level, msg);
		this.setLoggerName(loggerName);
	}

	public AcsLogRecord(Level level, String msg, Object parameters, String loggerName) {
		this(level, msg, loggerName);
		params = new Object[1];
		params[0] = parameters;
		this.setParameters(params);
	}

	public void setAudience(String audience) {
		this.audience = audience;
	}

	public String getAudience() {
                if(this.audience!=null)
    		    return this.audience;
                else
                    return "";
	}
        
	public void setArray(String array) {
		this.array = array;
	}

	public String getArray() {
                if(this.array!=null)
		    return this.array;
                else
                    return "";            
	}
        
	public void setAntenna(String antenna) {
		this.antenna = antenna;
	}

	public String getAntenna() {
                if(this.antenna!=null)
		    return this.antenna;
                else
                    return "";
	}
        
}

{'fraction_non_alphanumeric': 0.07693631669535284, 'fraction_numerical': 0.014113597246127367, 'mean_word_length': 2.840713813615334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '15935', 'n_tokens_mistral': 1717, 'n_tokens_neox': 1573, 'n_words': 674}