Skip to content

Commit c6fcf81

Browse files
authored
Merge pull request #26 from muflihun/develop
2.0.1
2 parents 8004adc + 10ad568 commit c6fcf81

7 files changed

Lines changed: 115 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## [2.0.1] - 27-03-2018
4+
- Dispatch verbose logs always without check
5+
36
## [2.0.0] - 01-03-2018
47
- Compatibility for server 2.0.0
58

samples/jni/src/com/muflihun/residue/Logger.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,36 @@
1+
/**
2+
* Logger.java
3+
*
4+
* Official Java client library for Residue logging server
5+
*
6+
* Copyright (C) 2017-present Muflihun Labs
7+
*
8+
* https://muflihun.com
9+
* https://muflihun.github.io/residue
10+
* https://github.com/muflihun/residue-java
11+
*
12+
* Author: @abumusamq
13+
*
14+
* Licensed under the Apache License, Version 2.0 (the "License");
15+
* you may not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
* http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing, software
21+
* distributed under the License is distributed on an "AS IS" BASIS,
22+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23+
* See the License for the specific language governing permissions and
24+
* limitations under the License.
25+
*/
26+
127
package com.muflihun.residue;
228

329
import java.lang.Exception;
430

31+
/**
32+
* Contains implementations of the dispatch functions that sends log messages
33+
*/
534
public class Logger {
635
private String id;
736

samples/jni/src/com/muflihun/residue/Residue.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
/**
2+
* Residue.java
3+
*
4+
* Official Java client library for Residue logging server
5+
*
6+
* Copyright (C) 2017-present Muflihun Labs
7+
*
8+
* https://muflihun.com
9+
* https://muflihun.github.io/residue
10+
* https://github.com/muflihun/residue-java
11+
*
12+
* Author: @abumusamq
13+
*
14+
* Licensed under the Apache License, Version 2.0 (the "License");
15+
* you may not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
* http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing, software
21+
* distributed under the License is distributed on an "AS IS" BASIS,
22+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23+
* See the License for the specific language governing permissions and
24+
* limitations under the License.
25+
*/
26+
127
package com.muflihun.residue;
228

329
import cz.adamh.NativeUtils;

samples/jni/src/com/muflihun/residue/ResiduePrintStream.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,36 @@
1+
/**
2+
* ResiduePrintStream.java
3+
*
4+
* Official Java client library for Residue logging server
5+
*
6+
* Copyright (C) 2017-present Muflihun Labs
7+
*
8+
* https://muflihun.com
9+
* https://muflihun.github.io/residue
10+
* https://github.com/muflihun/residue-java
11+
*
12+
* Author: @abumusamq
13+
*
14+
* Licensed under the Apache License, Version 2.0 (the "License");
15+
* you may not use this file except in compliance with the License.
16+
* You may obtain a copy of the License at
17+
*
18+
* http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing, software
21+
* distributed under the License is distributed on an "AS IS" BASIS,
22+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23+
* See the License for the specific language governing permissions and
24+
* limitations under the License.
25+
*/
26+
127
package com.muflihun.residue;
228

329
import java.io.PrintStream;
430

31+
/**
32+
* Print stream that sends to the residue server
33+
*/
534
public class ResiduePrintStream extends PrintStream {
635

736
public ResiduePrintStream(PrintStream org) {

samples/jni/src/residue-jni.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
#include <jni.h>
1+
//
2+
// Part of residue native binding for java
3+
//
4+
// Copyright (C) 2017-present Muflihun Labs
5+
//
6+
// https://muflihun.com
7+
// https://muflihun.github.io/residue
8+
// https://github.com/muflihun/residue-java
9+
//
10+
// Author: @abumusamq
11+
212
#include "residue-jni.h"
313
#include <residue/residue.h>
414

samples/jni/src/residue-jni.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//
2+
// Part of residue native binding for java
3+
//
4+
// Copyright (C) 2017-present Muflihun Labs
5+
//
6+
// https://muflihun.com
7+
// https://muflihun.github.io/residue
8+
// https://github.com/muflihun/residue-java
9+
//
10+
// Author: @abumusamq
11+
//
12+
113
#include <jni.h>
214
#ifndef Residue_JNI_H
315
#define Residue_JNI_H

src/com/muflihun/residue/Residue.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -598,25 +598,19 @@ public void fatal(String message, Throwable throwable) {
598598
}
599599

600600
public void verbose(Integer vlevel, String format, Object... args) {
601-
if (isErrorEnabled()) {
602-
String message = String.format(format, args);
601+
String message = String.format(format, args);
603602

604-
log(message, LoggingLevels.VERBOSE, vlevel);
605-
}
603+
log(message, LoggingLevels.VERBOSE, vlevel);
606604
}
607605

608606
public void verbose(Integer vlevel, Throwable t, String format, Object... args) {
609-
if (isErrorEnabled()) {
610-
String message = String.format(format, args);
607+
String message = String.format(format, args);
611608

612-
verbose(vlevel, message, t);
613-
}
609+
verbose(vlevel, message, t);
614610
}
615611

616612
public void verbose(Integer vlevel, String message, Throwable throwable) {
617-
if (isErrorEnabled()) {
618-
log(message, throwable, LoggingLevels.VERBOSE, vlevel);
619-
}
613+
log(message, throwable, LoggingLevels.VERBOSE, vlevel);
620614
}
621615

622616
public void log(Object msg, Throwable t, LoggingLevels level) {

0 commit comments

Comments
 (0)