<commit_before>// Copyright 2004-2006 Castle Project - http://www.castleproject.org/
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Castle.Services.Logging
{
	using System;
	using System.IO;


    public abstract class AbstractLoggerFactory : ILoggerFactory
	{
    	public AbstractLoggerFactory()
		{
		}

		public virtual ILogger Create(Type type)
		{
			if (type == null) throw new ArgumentNullException("type");

			return this.Create(type.FullName);
		}

		public virtual ILogger Create(Type type, LoggerLevel level)
		{
			if (type == null) throw new ArgumentNullException("type");

			return this.Create(type.FullName, level);
		}

		public abstract ILogger Create(String name);

		public abstract ILogger Create(String name, LoggerLevel level);

        /// <summary>
        /// Gets the configuration file.
        /// </summary>
        /// <param name="filename">i.e. log4net.config</param>
        /// <returns></returns>
        protected FileInfo GetConfigFile(string filename)
        {
			FileInfo result;

			if (Path.IsPathRooted(filename))
			{
				result = new FileInfo(filename);
			}
			else
			{
				result = new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Path.GetFileName(filename)));
			}
            
			return result;
        }
	}
}<commit_msg>Small change suggest by Ahmed<commit_after>// Copyright 2004-2006 Castle Project - http://www.castleproject.org/
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Castle.Services.Logging
{
	using System;
	using System.IO;


    public abstract class AbstractLoggerFactory : ILoggerFactory
	{
    	public AbstractLoggerFactory()
		{
		}

		public virtual ILogger Create(Type type)
		{
			if (type == null) throw new ArgumentNullException("type");

			return this.Create(type.FullName);
		}

		public virtual ILogger Create(Type type, LoggerLevel level)
		{
			if (type == null) throw new ArgumentNullException("type");

			return this.Create(type.FullName, level);
		}

		public abstract ILogger Create(String name);

		public abstract ILogger Create(String name, LoggerLevel level);

        /// <summary>
        /// Gets the configuration file.
        /// </summary>
        /// <param name="filename">i.e. log4net.config</param>
        /// <returns></returns>
        protected FileInfo GetConfigFile(string filename)
        {
			FileInfo result;

			if (Path.IsPathRooted(filename))
			{
				result = new FileInfo(filename);
			}
			else
			{
				result = new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filename));
			}
            
			return result;
        }
	}
}
{'fraction_non_alphanumeric': 0.10341974627688913, 'fraction_numerical': 0.007170435741864313, 'mean_word_length': 2.9682713347921226, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '532298', 'n_tokens_mistral': 1087, 'n_tokens_neox': 978, 'n_words': 336}