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


Java Logger.trace方法代码示例

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


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

示例1: main

import org.pmw.tinylog.Logger; //导入方法依赖的package包/类
public static void main(String[] args) {

		// source coude generate level tag
		final String preLevelTag = "[[preLevelTag]]";
		final String postLevelTag = "[[postLevelTag]]";

		// for "1 default example" and "2 log-level decoration example" (see tinylog.properties) 
		Logger.trace("hello trace-world");
		Logger.debug("hello debug-world");
		Logger.info("hello info-world");
		Logger.warn("hello warn-world");
		//		Logger.warn("hello warn-world with {}source code generated{} 'misuse' of the level tag", preLevelTag, postLevelTag);
		Logger.error("hello error-world");


		// for "3 custom tag usage example" (see tinylog.properties)
		//		Logger.info("Example 1 - sequential tag replacement:   [[someCustomPreTag]] some text [[someCustomPostTag]] and possibly some other text");
		//		Logger.info("Example 2 - coloring of tag occurrence:   ----- pre-init (phase 1) ----- and possibly some other text");
		//		Logger.info("Example 3 - coloring within a tag:        <---- init (phase 2) ----> and possibly some other text");
		//		Logger.info("Example 4 - coloring of tagged content:   <==== init DONE ====> and possibly some other text");
		//		Logger.info("Example 5 - coloring or arbitrary strings: UNCAUGHT EXCEPTION: error in some class");
	}
 
开发者ID:tobiasrm,项目名称:tinylog-coloredconsole,代码行数:23,代码来源:Main.java

示例2: setShared

import org.pmw.tinylog.Logger; //导入方法依赖的package包/类
/**
 * populate the list of shared values from a given array
 */
public boolean setShared(List<String[]> shared){

    //iterate through list, adding
    ArrayList<String> lsSharedOptions = new ArrayList<String>();
    for(String[] line : shared){ //for each line in the shared file
        lsSharedOptions.add(line[0]); //option
        String[] toAdd = {line[0], line[1]};
        this.collection.lsShared.add(toAdd);

        Logger.trace("Added shared value '{}:{}'",line[0],line[1]);
    }

    //validate the set of shared values. if not validated, clear
    if(!isValidOptions(lsSharedOptions)){
        this.collection.lsShared.clear();
        Logger.warn("Collection-level warning: 'shared.csv' file is not accurately formatted or is empty");
        return false;
    }

    //already added
    return true;
}
 
开发者ID:lib-re,项目名称:dublin-core-text-parser,代码行数:26,代码来源:Parser.java

示例3: createContributor

import org.pmw.tinylog.Logger; //导入方法依赖的package包/类
/**
 * Return a contributor object whose qualifier has been selected with care.
 * @param qualifierText the raw text from the metadata file
 * @param fullName TODO switch to pass a 'main.Person' object
 */
public static Contributor createContributor(String qualifierText, String fullName) {
    String qualifier = determineContributorQualifier(qualifierText);
    String value = determineName(fullName).trim();

    Logger.trace("CONTRIBUTOR created | qualifier: {}, value: {}.", qualifier, value);

    return new Contributor(qualifier, value);
}
 
开发者ID:lib-re,项目名称:dublin-core-text-parser,代码行数:14,代码来源:Contributor.java

示例4: main

import org.pmw.tinylog.Logger; //导入方法依赖的package包/类
public static void main(String[] args) {
	byte b1 = (byte)55;
	byte b2 = (byte)175;
	Logger.info("hello - info");
	Logger.debug("hello - debug");
	Logger.trace("hello - trace");
	Logger.info("double: {0.##}", Double.valueOf(5454.545464));
	Logger.info("double: {}", String.format("%.2f", Double.valueOf(5454.545464)));
	Logger.debug("setValue({}, {}), old_val=0x{}, new_val=0x{}",
			Integer.valueOf(1), Boolean.valueOf(true), Integer.toHexString(b1), Integer.toHexString(b2));
}
 
开发者ID:mattjlewis,项目名称:diozero,代码行数:12,代码来源:TinylogTest.java


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