Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rejuvenate log levels using setting 2 #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/deviation/DeviationUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ private static void readBinFromDevice(DfuDevice dev, String fname, int address,
private static void listDevices(List <DfuDevice> devs)
{
if (devs.size() == 0) {
LOG.info("No devices found.");
LOG.fine("No devices found.");
} else {
LOG.info(String.format("Device\t%9s %8s %8s %7s %s", "Interface", "Start", "End", "Size", "Count"));
for (DfuDevice dev: devs) {
int i = 0;
LOG.info(String.format("%s", dev.getTxInfo().type().getName()));
LOG.fine(String.format("%s", dev.getTxInfo().type().getName()));
for (DfuInterface iface: dev.Interfaces()) {
for (SegmentParser segment: iface.Memory().segments()) {
for (Sector sector: segment.sectors()) {
Expand Down
2 changes: 1 addition & 1 deletion src/deviation/Dfu.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public static int setIdle(DfuDevice dev)
LOG.severe("Device still in Runtime Mode!");
return -1;
case DfuStatus.STATE_DFU_ERROR:
LOG.fine("dfuERROR, clearing status");
LOG.warning("dfuERROR, clearing status");
if (clearStatus(dev) < 0) {
LOG.severe("error clear_status");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions src/deviation/ZipFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private List<FileInfo> GetFileList(String fname) {
}
ostream.flush();
if (ostream.size() != ze.getSize()) {
LOG.warning(String.format("Only read %d bytes from %s:%s (expected %d)", ostream.size(), zipFile, fname, ze.getSize()));
LOG.info(String.format("Only read %d bytes from %s:%s (expected %d)", ostream.size(), zipFile, fname, ze.getSize()));
} else {
buffer = ostream.toByteArray();
}
Expand Down Expand Up @@ -69,7 +69,7 @@ public byte[] read(String fname) {
}
ostream.flush();
if (ostream.size() != ze.getSize()) {
LOG.warning(String.format("Only read %d bytes from %s:%s (expected %d)", ostream.size(), zipFile, fname, ze.getSize()));
LOG.info(String.format("Only read %d bytes from %s:%s (expected %d)", ostream.size(), zipFile, fname, ze.getSize()));
} else {
buffer = ostream.toByteArray();
}
Expand Down
2 changes: 1 addition & 1 deletion src/deviation/filesystem/FlashIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void close() throws IOException {
}
}
}
public void flush() { LOG.info("flush");}
public void flush() { LOG.finer("flush");}
public int getSectorSize() throws IOException { return fsSectorSize; }
public long getSize() throws IOException { return ram.length - startOffset; }
public boolean isClosed() { return false; }
Expand Down
6 changes: 3 additions & 3 deletions src/deviation/filesystem/TxInterfaceCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ protected static List<FileInfo> readDirRecur(String parent, FsDirectory dir) thr
if (entry.isDirectory()) {
if (entry.getName().equals(".") || entry.getName().equals(".."))
continue;
LOG.fine(String.format("DIR: %s", entry.getName()));
LOG.finer(String.format("DIR: %s", entry.getName()));
files.addAll(readDirRecur(parent + entry.getName() + "/", entry.getDirectory()));
} else {
files.add(new FileInfo(parent + entry.getName(), (int)entry.getFile().getLength()));
LOG.fine(String.format("FILE: %s (%d)", entry.getName(), entry.getFile().getLength()));
LOG.finer(String.format("FILE: %s (%d)", entry.getName(), entry.getFile().getLength()));
}
}
return files;
Expand All @@ -45,7 +45,7 @@ protected void readDir(FileSystem fs, String dirStr) {
Iterator<FsDirectoryEntry> itr = dir.iterator();
while(itr.hasNext()) {
FsDirectoryEntry entry = itr.next();
LOG.info(entry.getName());
LOG.finer(entry.getName());
}
} catch (IOException e) { e.printStackTrace(); }
}
Expand Down
4 changes: 2 additions & 2 deletions src/deviation/gui/MonitorUSB.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public String doInBackground() {
if (dfuDev != null) {
LibUsb.freeDeviceList(this.devices, true);
dfuDev = null;
LOG.info("Unplug detected");
LOG.finer("Unplug detected");
state_changed = true;
//Signal disconnect
}
Expand All @@ -71,7 +71,7 @@ public String doInBackground() {
dfuDev = dev;
dfuDev.setTxInfo(TxInfo.getTxInfo(dfuDev));
this.devices = devices;
LOG.info("Hotplug detected");
LOG.finer("Hotplug detected");
state_changed = true;
//Signal connect/change
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/deviation/gui/TextEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public TextEditor(FileInfo file) {
textArea.setMarkOccurrences(true);
textArea.append(finalData);
Font f = textArea.getFont();
LOG.info(String.format("Font: %d", f.getSize()));
LOG.finer(String.format("Font: %d", f.getSize()));
f = new Font(f.getFamily(), f.getStyle(), f.getSize()+5);
textArea.setFont(f);
RTextScrollPane sp = new RTextScrollPane(textArea);
Expand Down