Browse Source

Merge origin/master

Conflicts:
	src/wuerfelthreads/Start.java
	src/wuerfelthreads/view/WuerfelView.form
	src/wuerfelthreads/view/WuerfelView.java
master
BakeOrDie 3 years ago
parent
commit
0b7127cebd

+ 1
- 1
src/mvcgrafik/controller/BtnController.java View File

import mvcgrafik.model.Figure; import mvcgrafik.model.Figure;
import mvcgrafik.model.GrafikModel; import mvcgrafik.model.GrafikModel;
import mvcgrafik.view.GrafikMenuView; import mvcgrafik.view.GrafikMenuView;
import mvcgrafik.logger.OhmLogger;
import ohmlogger.OhmLogger;




/** /**

+ 1
- 1
src/mvcgrafik/controller/GrafikController.java View File

import java.util.logging.Logger; import java.util.logging.Logger;
import mvcgrafik.model.Figure; import mvcgrafik.model.Figure;
import mvcgrafik.model.GrafikModel; import mvcgrafik.model.GrafikModel;
import mvcgrafik.logger.OhmLogger;
import ohmlogger.OhmLogger;
import mvcgrafik.view.GrafikView; import mvcgrafik.view.GrafikView;





+ 0
- 26
src/mvcgrafik/logger/MyFormatter.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/

package mvcgrafik.logger;

import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;

/**
*
* @author chris
*/
public class MyFormatter extends Formatter {
@Override
public String format(LogRecord lr) {
String date = String.format("%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp", new Date(lr.getMillis()));
String s = ("| ")+lr.getMillis()+(" | ")+date+(" | ")+lr.getLevel().toString()+(" | ")+lr.getSourceClassName()+(" | ")+lr.getMessage()+(" | ")+"\n";
return s;
}
}

+ 0
- 54
src/mvcgrafik/logger/OhmLogger.java View File

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mvcgrafik.logger;


import mvcgrafik.logger.MyFormatter;
import java.io.File;
import java.io.IOException;
import java.util.logging.*;



/**
*
* @author chris, hd
*/
public class OhmLogger
{
public OhmLogger()
{
}
private static Logger lg = null;
public static Logger getLogger()
{
if (lg == null)
{
lg = Logger.getLogger("OhmLogger");
initLogger();
}
return lg;
}
private static void initLogger()
{
try{
String datei = System.getProperty("java.io.tmpdir") + File.separator + "log.txt";
FileHandler fh = new FileHandler(datei);
ConsoleHandler ch = new ConsoleHandler();
lg.addHandler(fh);
ch.setFormatter(new MyFormatter());
lg.setUseParentHandlers(false);
lg.addHandler(ch);
lg.setLevel(Level.ALL);
}
catch(IOException ioex)
{
System.err.println(ioex);
}
}
}

+ 1
- 1
src/mvcgrafik/view/GrafikView.java View File

import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import mvcgrafik.model.GrafikModel; import mvcgrafik.model.GrafikModel;
import mvcgrafik.logger.OhmLogger;
import ohmlogger.OhmLogger;


/** /**
* *

Loading…
Cancel
Save