You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2016/10/05 07:25:46 UTC
[1/2] airavata git commit: Add logback.xml to configure logback
logging with TimebasedRollingPolicy.
Repository: airavata
Updated Branches:
refs/heads/lahiru/AIRAVATA-2107 5dc31dc8b -> 573f15379
Add logback.xml to configure logback logging with TimebasedRollingPolicy.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/35b7d34c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/35b7d34c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/35b7d34c
Branch: refs/heads/lahiru/AIRAVATA-2107
Commit: 35b7d34c8850248edd103e75d141cc103f157a15
Parents: 5dc31dc
Author: Lahiru Ginnaliya Gamathige <la...@apache.org>
Authored: Tue Oct 4 08:20:08 2016 -0700
Committer: Lahiru Ginnaliya Gamathige <la...@apache.org>
Committed: Tue Oct 4 08:20:08 2016 -0700
----------------------------------------------------------------------
.../server/src/main/resources/logback.xml | 31 ++++++++++++++++++++
1 file changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/35b7d34c/modules/configuration/server/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/logback.xml b/modules/configuration/server/src/main/resources/logback.xml
new file mode 100644
index 0000000..4153f84
--- /dev/null
+++ b/modules/configuration/server/src/main/resources/logback.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <property name="DEV_HOME" value="../logs" />
+
+ <appender name="FILE-AUDIT"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>../logs/airavata.log</file>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss} [%thread] %level %logger{35} - %msg%n
+ </Pattern>
+ </encoder>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!-- rollover daily -->
+ <fileNamePattern>../logs/airavata.%d{yyyy-MM-dd}.%i.log
+ </fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>10MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ </rollingPolicy>
+
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="FILE-AUDIT" />
+ </root>
+
+</configuration>
\ No newline at end of file
[2/2] airavata git commit: properly using min-max-counters
Posted by la...@apache.org.
properly using min-max-counters
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/573f1537
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/573f1537
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/573f1537
Branch: refs/heads/lahiru/AIRAVATA-2107
Commit: 573f153793ad04012ad9e53da33efa0e79af6798
Parents: 35b7d34
Author: Lahiru Ginnaliya Gamathige <la...@apache.org>
Authored: Wed Oct 5 00:25:35 2016 -0700
Committer: Lahiru Ginnaliya Gamathige <la...@apache.org>
Committed: Wed Oct 5 00:25:35 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/airavata/server/ServerMain.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/573f1537/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
----------------------------------------------------------------------
diff --git a/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java b/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
index e175ae7..1230e99 100644
--- a/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
+++ b/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
@@ -230,9 +230,9 @@ public class ServerMain {
final ActorRef subscriber = mySystem.actorOf(Props.create(KamonSnapShotter.class, metrices), "subscriber");
public StatsHandler() {
- Kamon.metrics().subscribe("counter", "**",subscriber);
- Kamon.metrics().subscribe("histogram", "**", subscriber);
- Kamon.metrics().subscribe("minmaxcounter", "**", subscriber);
+ Kamon.metrics().subscribe("counter", "**", subscriber, true);
+ Kamon.metrics().subscribe("histogram", "**", subscriber, true);
+ Kamon.metrics().subscribe("min-max-counter", "**", subscriber, true);
}
@@ -265,18 +265,18 @@ public class ServerMain {
if (message instanceof SubscriptionsDispatcher.TickMetricSnapshot) {
final SubscriptionsDispatcher.TickMetricSnapshot tickSnapshot = (SubscriptionsDispatcher.TickMetricSnapshot) message;
final Map<Entity, EntitySnapshot> histograms = filterCategory("histogram", tickSnapshot);
- final Map<Entity, EntitySnapshot> minMaxCounter = filterCategory("minmaxcounter", tickSnapshot);
+ final Map<Entity, EntitySnapshot> minMaxCounter = filterCategory("min-max-counter", tickSnapshot);
histograms.forEach((e, s) -> {
final Histogram.Snapshot histogramSnapshot = s.histogram("histogram").get();
- final String value = String.format("recordings:%s, min: %d, max: %d, 95percentile: %d\n", histogramSnapshot.numberOfMeasurements(),
+ final String value = String.format("min: %d, max: %d, 95percentile: %d\n",
histogramSnapshot.min(), histogramSnapshot.max(), histogramSnapshot.percentile(95));
metrices.put(e.name(), value);
});
minMaxCounter.forEach((e, s) -> {
- final Histogram.Snapshot histogramSnapshot = s.minMaxCounter("minmaxcounter").get();
- final String value = String.format("recordings:%s, min: %d, max: %d, 95percentile: %d\n", histogramSnapshot.numberOfMeasurements(),
+ final Histogram.Snapshot histogramSnapshot = s.minMaxCounter("min-max-counter").get();
+ final String value = String.format("min: %d, max: %d, 95percentile: %d\n",
histogramSnapshot.min(), histogramSnapshot.max(), histogramSnapshot.percentile(95));
metrices.put(e.name(), value);
});