本文整理汇总了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);
}
示例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);
}
示例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(",")));
}