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


Java Log.setLogger方法代码示例

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


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

示例1: Main

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
Main() {
	// Start the screen controller
	scrController = new ScreenController();
	
	//window.add(background);
	add(scrController.getScreen());		
	
	// Set the logger
	Log.setLogger(new com.magicrealm.common.Logger());
	
	// Build and show the window
	pack();
	setVisible(true);
    setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
 
开发者ID:abejfehr,项目名称:magic-realm,代码行数:17,代码来源:Main.java

示例2: main

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
public static void main(String[] args) throws IOException {



        JDialog scenarioSelection = new JDialog((JFrame)null,true);

        final ScenarioJComponent scenario = new ScenarioJComponent(new HabitatDeploymentScenario());

        final JPanel contentPane = new JPanel(new BorderLayout());
        contentPane.add(new JScrollPane(scenario.getJComponent()), BorderLayout.CENTER);
        //create ok and exit button
        Box buttonBox = new Box( BoxLayout.LINE_AXIS);
        contentPane.add(buttonBox, BorderLayout.SOUTH);
        final JButton ok = new JButton("OK");
        ok.addActionListener(e -> scenarioSelection.dispatchEvent(new WindowEvent(
                scenarioSelection,WindowEvent.WINDOW_CLOSING
        )));
        buttonBox.add(ok);
        final JButton cancel = new JButton("Cancel");
        cancel.addActionListener(e -> System.exit(0));
        buttonBox.add(cancel);


        scenarioSelection.setContentPane(contentPane);
        scenarioSelection.pack();
        scenarioSelection.setVisible(true);


        FishState state = new FishState(System.currentTimeMillis(),1);
        Log.set(Log.LEVEL_NONE);
        Log.setLogger(new FishStateLogger(state, Paths.get("log.csv")));


        state.setScenario(scenario.getScenario());
        HabitatDeployment vid = new HabitatDeployment(state);
        vid.getPolicyButtons().add(new GearSetterButton());
        Console c = new Console(vid);
        c.setSize(1000, 600);
        c.setVisible(true);
    }
 
开发者ID:CarrKnight,项目名称:POSEIDON,代码行数:41,代码来源:HabitatDeployment.java

示例3: initLogger

import com.esotericsoftware.minlog.Log; //导入方法依赖的package包/类
/**
 * Configure the logger used for output.
 */
private static void initLogger() {
    Log.setLogger(new FilteringLogger(conf.get("App", "log_blacklist").split(",")));
}
 
开发者ID:dominiks,项目名称:uristmapsj,代码行数:7,代码来源:Uristmaps.java


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