当前位置: 首页>>代码示例>>Java>>正文


Java OptionConverter.toFileSize方法代码示例

本文整理汇总了Java中org.apache.log4j.helpers.OptionConverter.toFileSize方法的典型用法代码示例。如果您正苦于以下问题:Java OptionConverter.toFileSize方法的具体用法?Java OptionConverter.toFileSize怎么用?Java OptionConverter.toFileSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.log4j.helpers.OptionConverter的用法示例。


在下文中一共展示了OptionConverter.toFileSize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
public void setMaxFileSize(String value) {
	if (value == null) {
		LogLog.warn("Null max file size supplied for appender [" + this.getName() + "], defaulting to " + this.getProperties().getMaxFileSize());
		return;
	}
	value = value.trim();
	if ("".equals(value)) {
		LogLog.warn("Empty max file size supplied for appender [" + this.getName() + "], defaulting to " + this.getProperties().getMaxFileSize());
		return;
	}
	final long defaultMaxFileSize = this.getProperties().getMaxFileSize();
	final long maxFileSize = OptionConverter.toFileSize(value, defaultMaxFileSize);
	this.getProperties().setMaxFileSize(maxFileSize);
}
 
开发者ID:foundation-runtime,项目名称:logging,代码行数:15,代码来源:FoundationFileRollingAppender.java

示例2: setMinFreeDiskSpace

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
/**
 * <b>Warning</b> Use of this property requires Java 6.
 * 
 * @param value
 */
public void setMinFreeDiskSpace(String value) {
	if (value == null) {
		LogLog.warn("Null min free disk space supplied for appender [" + this.getName() + "], defaulting to " + this.getProperties().getMinFreeDiscSpace());
		return;
	}
	value = value.trim();
	if ("".equals(value)) {
		LogLog.warn("Empty min free disk space supplied for appender [" + this.getName() + "], defaulting to " + this.getProperties().getMinFreeDiscSpace());
		return;
	}
	final long defaultMinFreeDiskSpace = this.getProperties().getMinFreeDiscSpace();
	final long minFreeDiskSpace = OptionConverter.toFileSize(value, defaultMinFreeDiskSpace);
	this.getProperties().setMinFreeDiscSpace(minFreeDiskSpace);
}
 
开发者ID:foundation-runtime,项目名称:logging,代码行数:20,代码来源:FoundationFileRollingAppender.java

示例3: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
public void setMaxFileSize(String value)
{
	maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1L);
}
 
开发者ID:equella,项目名称:Equella,代码行数:5,代码来源:DailySizeRollingAppender.java

示例4: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
public void setMaxFileSize(String value) {
	this.maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
}
 
开发者ID:dreajay,项目名称:jcode,代码行数:4,代码来源:GroupRollingFileAppender.java

示例5: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
/**
   Set the maximum size that the output file is allowed to reach
   before being rolled over to backup files.

   <p>In configuration files, the <b>MaxFileSize</b> option takes an
   long integer in the range 0 - 2^63. You can specify the value
   with the suffixes "KB", "MB" or "GB" so that the integer is
   interpreted being expressed respectively in kilobytes, megabytes
   or gigabytes. For example, the value "10KB" will be interpreted
   as 10240.
 */
public
void setMaxFileSize(String value) {
  maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:16,代码来源:RollingFileAppender.java

示例6: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
/**
 * Set the maximum size that the output file is allowed to reach before being rolled over to backup files.
 *
 * <p>In configuration files, the <b>MaxFileSize</b> option takes an long integer in the range 0 - 2^63. You can
 * specify the value with the suffixes "KB", "MB" or "GB" so that the integer is interpreted being expressed
 * respectively in kilobytes, megabytes or gigabytes. For example, the value "10KB" will be interpreted as 10240.
 */
public void setMaxFileSize(String value)
{
    maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
}
 
开发者ID:wso2,项目名称:andes,代码行数:12,代码来源:QpidCompositeRollingAppender.java

示例7: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
/**
 * Set the maximum size that the output file is allowed to reach before being
 * rolled over to backup files.
 * <p>
 * In configuration files, the <b>MaxFileSize</b> option takes an long integer
 * in the range 0 - 2^63. You can specify the value with the suffixes "KB",
 * "MB" or "GB" so that the integer is interpreted being expressed
 * respectively in kilobytes, megabytes or gigabytes. For example, the value
 * "10KB" will be interpreted as 10240.
 */
public void setMaxFileSize(String value) {
  maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
}
 
开发者ID:apache,项目名称:incubator-sentry,代码行数:14,代码来源:RollingFileWithoutDeleteAppender.java

示例8: setMaxFileSize

import org.apache.log4j.helpers.OptionConverter; //导入方法依赖的package包/类
/**
 Set the maximum size that the output file is allowed to reach
 before being rolled over to backup files.

 <p>In configuration files, the <b>MaxFileSize</b> option takes an
 long integer in the range 0 - 2^63. You can specify the value
 with the suffixes "KB", "MB" or "GB" so that the integer is
 interpreted being expressed respectively in kilobytes, megabytes
 or gigabytes. For example, the value "10KB" will be interpreted
 as 10240.
*/
public void setMaxFileSize(String value) {
    maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:15,代码来源:CompositeRollingAppender.java


注:本文中的org.apache.log4j.helpers.OptionConverter.toFileSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。