Skip to content

Commit

Permalink
fix log error
Browse files Browse the repository at this point in the history
  • Loading branch information
lucarin91 committed May 10, 2016
1 parent 4a6e253 commit b461057
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
5 changes: 5 additions & 0 deletions api/src/main/java/lr/api/FrontAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lr.core.CmdArgs.NodeArgs;
import lr.core.Nodes.GossipResource;
import lr.core.Helper;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand All @@ -18,6 +20,9 @@
@SpringBootApplication
public class FrontAPI {
public static void main(String[] args) {
Logger.getRootLogger().setLevel(Level.OFF);
Logger.getLogger("lr").setLevel(Level.INFO);

NodeArgs s = new NodeArgs();
Helper.parseArgs(s, args);

Expand Down
9 changes: 6 additions & 3 deletions app/src/main/java/lr/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import lr.api.FrontAPI;
import lr.core.Helper;
import lr.core.Nodes.StorageNode;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.pattern.LogEvent;

import java.io.BufferedReader;
import java.io.IOException;
Expand All @@ -19,16 +22,16 @@
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

/**
* Created by luca on 24/02/16.
*/

public class App {

public static void main(String[] args) throws IOException {
final Logger LOG = Logger.getLogger(App.class);

Logger.getRootLogger().setLevel(Level.OFF);
Logger.getLogger("lr").setLevel(Level.INFO);

AppArgs s = new AppArgs();
Helper.parseArgs(s, args);
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/java/lr/core/Nodes/StorageNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ private void doManageOperation(MessageManage msg) {
_store.update(msg.getData());
break;
case NOTHING:
// Set<Data<?>> set = new HashSet<>();
// set.add(thisData);
// set.add(thatData);
Data<?> conflictData = new Data<>(thisData, thatData);
_store.update(conflictData);
break;
Expand Down
9 changes: 7 additions & 2 deletions core/src/main/java/lr/core/PadFs.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

import lr.core.CmdArgs.NodeArgs;
import lr.core.Nodes.StorageNode;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import java.io.IOException;
import java.net.UnknownHostException;

/**
* Created by luca on 24/02/16.
*/
public class PadFs {
public static void main(String[] args) throws IOException {
public static void main(String[] args) {

Logger.getRootLogger().setLevel(Level.OFF);
Logger.getLogger("lr").setLevel(Level.INFO);

NodeArgs s = new NodeArgs();
Helper.parseArgs(s, args);

Expand Down
1 change: 0 additions & 1 deletion core/src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%-6r %d{ISO8601} %-5p %40.40c %x - %m\n

log4j.logger.lr=debug, stdout
#log4j.logger.com.google.code.GossipService=debug, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
Expand Down
12 changes: 6 additions & 6 deletions start-docker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
print $res;

for my $i (1..$N){
$res = `docker stop server$i`;
print $res;
$res = `docker rm server$i`;
print $res;
$res = `docker run -d --name server$i --net fs-net --ip $IP.$i pad-fs/core:0.1 -h server$i:$IP.$i:2000 -m server3:$IP.3:2000`;
print $res;
$res = `docker stop server$i`;
print $res;
$res = `docker rm server$i`;
print $res;
$res = `docker run -d --name server$i --net fs-net --ip $IP.$i pad-fs/core:0.1 -h server$i:$IP.$i:2000 -m server3:$IP.3:2000`;
print $res;
}

$res = `docker stop api`;
Expand Down
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "MonitorWebApp",
"description": "The monitor app for the PAD-FS distributed file system",
"version": "0.0.1",
"version": "0.0.3",
"main": "index.html",
"window": {
"width": 850,
Expand Down
2 changes: 1 addition & 1 deletion webapp/zip-build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

my $NAME = 'MonitorWebApp';
my $PATH = "build/$NAME";
my $V = 'v0.2';
my $V = 'v0.3';
my @files = <"$PATH/*">;

foreach my $file (@files) {
Expand Down

0 comments on commit b461057

Please sign in to comment.