git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@6209 ebf7c1c2-ba36-0410-9fe8-c592906822b4

This commit is contained in:
coalado 2009-06-14 13:52:44 +00:00
parent 2dde473013
commit 86483544d2
9 changed files with 2029 additions and 579 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,6 +31,7 @@ import java.lang.reflect.Constructor;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
@ -159,6 +160,7 @@ public class Main {
}
public static void main(String args[]) {
System.setProperty("file.encoding", "UTF-8");
OSDetector.setOSString(System.getProperty("os.name"));
// System.setProperty("os.name", "Windows Vista m.a.c");
@ -447,6 +449,7 @@ public class Main {
} catch (IOException e1) {
}
}
LOGGER.info(new Date()+"");
LOGGER.info("init Configuration");
Main.increaseSplashStatus();

View File

@ -25,6 +25,7 @@ public class JDLogger {
private static Logger LOGGER = null;
public static String LOGGER_NAME = "java_downloader";
private static ConsoleHandler console;
public static long INIT_TIME=System.currentTimeMillis();
/**
* Liefert die Klasse zurück, mit der Nachrichten ausgegeben werden können
@ -35,7 +36,7 @@ public class JDLogger {
public static Logger getLogger() {
if (LOGGER == null) {
LOGGER = Logger.getLogger(LOGGER_NAME);
Formatter formatter = new LogFormatter();
LOGGER.setUseParentHandlers(false);
@ -52,7 +53,10 @@ public class JDLogger {
}
return LOGGER;
}
public static void timestamp(String msg){
getLogger().warning(jd.nutils.Formatter.formatMilliseconds(System.currentTimeMillis()-INIT_TIME)+" : "+msg);
}
public static void exception(Throwable e) {
exception(Level.SEVERE, e);
}

View File

@ -24,6 +24,8 @@ import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;
import jd.nutils.Formatter;
/**
* Mit dieser Klasse können die Logmeldungen anders dargestellt werden. Der Code
@ -35,15 +37,15 @@ import java.util.logging.SimpleFormatter;
*/
public class LogFormatter extends SimpleFormatter {
private final static String format = "{0,date} {0,time}";
// private final static String format = "{0,date} {0,time}";
private Object args[] = new Object[1];
Date dat = new Date();
private MessageFormat formatter;
// private MessageFormat formatter;
// Line separator string. This is the value of the line.separator
// property at the moment that the SimpleFormatter was created.
private String lineSeparator = System.getProperty("line.separator");
private StringBuilder sb;
private StringBuffer text;
// private StringBuffer text;
//@Override
public synchronized String format(LogRecord record) {
@ -54,17 +56,18 @@ public class LogFormatter extends SimpleFormatter {
dat.setTime(record.getMillis());
args[0] = dat;
text = new StringBuffer();
if (formatter == null) {
formatter = new MessageFormat(format);
}
formatter.format(args, text, null);
// text = new StringBuffer();
// if (formatter == null) {
// formatter = new MessageFormat(format);
// }
// formatter.format(args, text, null);
String message = formatMessage(record);
sb.append(text);
sb.append(" - ");
// sb.append(text);
// sb.append(" - ");
if(JDLogger.getLogger().getLevel()==Level.ALL){
sb.append(record.getLevel().getLocalizedName());
sb.append(Formatter.formatMilliseconds(record.getMillis()-JDLogger.INIT_TIME));
sb.append(" - ");
sb.append(record.getLevel().getName());
sb.append(" [");
if (record.getSourceClassName() != null) {
sb.append(record.getSourceClassName());

View File

@ -141,7 +141,7 @@ public class AboutDialog extends AbstractDialog {
private DevEntry[] getDevs() {
Vector<DevEntry> devs = new Vector<DevEntry>();
devs.add(new DevEntry("coalado", "support@jdownloader.org", "JDownloader core, Framework, OCR, Swing GUI, Reconnect, Container, Website, Project Administration"));
devs.add(new DevEntry("coalado", "coalado@jdownloader.org", "JDownloader core, Framework, OCR, Swing GUI, Reconnect, Container, Homepage, Project Administration"));
devs.add(new DevEntry("Botzi", "botzi@jdownloader.org", "Hoster / Decrypter / Addons, Bugfixing, Database backend, No Support"));
devs.add(new DevEntry("DwD", "dwd@jdownloader.org", "hoster, ocr, decrypter, extractor, reconnect"));
@ -156,10 +156,19 @@ public class AboutDialog extends AbstractDialog {
devs.add(new DevEntry("eXecuTe", "jd.execute@gmail.com", "command line support, language editor, newsfeed addon, tango theme, some plugins"));
devs.add(new DevEntry("ManiacMansion", "ManiacMansion@jdownloader.org", "OCR/AntiCaptcha, Hoster/Decrypter plugins, Bugfixing"));
devs.add(new DevEntry("Sheadox", "sheadox@jdownloader.org", "Hoster plugins, Decrypt plugins, Support"));
devs.add(new DevEntry("Viperb0y", "support@jdownloader.org", "Hoster / Decrypter, Support and Bugfixing"));
devs.add(new DevEntry("Andrei", "andrei030@hotmail.com", "Logo Design (v2)"));
devs.add(new DevEntry("Gamewalker", "-", "Hoster plugins, Decrypt plugins, Support"));
devs.add(new DevEntry("Trazo", "ancoar@gmail.com", "Logo Design (v3)"));
devs.add(new DevEntry("Freeloader", "-", "Turkish Translation, Homepage Translation"));
devs.add(new DevEntry("Muelas", "-", "Spanish Translation, Homepage Translation"));
devs.add(new DevEntry("Thartist", "-", "Spanish Translation, Homepage Translation"));
devs.add(new DevEntry("Firx", "-", "Russian Translation"));
devs.add(new DevEntry("Now Y-Dr", "-", "Spanish Translation"));
devs.add(new DevEntry("Jaak", "-", "Dutch Translation"));
devs.add(new DevEntry("Moktar", "-", "Arabic Translation"));
devs.add(new DevEntry("Sna696", "-", "Italian Translation"));
// Collections.sort(devs);
return devs.toArray(new DevEntry[] {});
}

View File

@ -739,6 +739,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, WindowListener {
switch (event.getID()) {
case ControlEvent.CONTROL_INIT_COMPLETE:
// setTitle(JDUtilities.getJDTitle());
logger.info("Init complete");
SimpleGUI.this.setWaiting(false);
SimpleGUI.this.setEnabled(true);

View File

@ -51,7 +51,13 @@ public class Formatter {
if (hours == 0) { return Formatter.fillInteger(minutes, 2, "0") + ":" + Formatter.fillInteger(seconds, 2, "0"); }
return Formatter.fillInteger(hours, 2, "0") + ":" + Formatter.fillInteger(minutes, 2, "0") + ":" + Formatter.fillInteger(seconds, 2, "0");
}
/**
* FOIrmatiert im format hours:minutes:seconds.ms
* @param ms
*/
public static String formatMilliseconds(long ms){
return formatSeconds(ms/1000)+"."+ms%1000;
}
public static String formatFilesize(double value, int size) {
if (value > 1024 && size < 5) {
return formatFilesize(value / 1024.0, ++size);

View File

@ -77,8 +77,8 @@ public class Updater {
WebUpdater.getConfig("WEBUPDATE").setProperty("BRANCH", "null");
WebUpdater.getConfig("WEBUPDATE").save();
// WebUpdater.getConfig("WEBUPDATE").setProperty("BRANCH", "null");
// WebUpdater.getConfig("WEBUPDATE").save();
System.out.println("STATUS: Webupdate");
upd.webupdate();
// System.out.println("STATUS: Webupdate ende");
@ -91,7 +91,7 @@ public class Updater {
upd.moveJars(getCFG("dist_dir"));
// // // System.out.println("STATUS: FINISHED");
upd.cleanUp();
String id = upd.createBranch(JOptionPane.showInputDialog(upd.frame, "branchname"));
upd.createBranch(JOptionPane.showInputDialog(upd.frame, "branchname"));
ArrayList<File> list = upd.getFileList();
// //
@ -104,9 +104,9 @@ public class Updater {
// upd.clonebluehost2();
upd.uploadHashList();
upd.refreshUpdateJar();
// upd.refreshUpdateJar();
// upd.spread(list);
upd.incFTPSpread(upd.branch);
// upd.incFTPSpread(upd.branch);
System.exit(0);
}