Skip to content

Commit 7696344

Browse files
authored
Merge pull request #160 from iot-dsa-v2/develop
0.70.5
2 parents ba80610 + 28de492 commit 7696344

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subprojects {
55
apply plugin: 'maven'
66

77
group 'org.iot-dsa'
8-
version '0.70.4'
8+
version '0.70.5'
99

1010
targetCompatibility = JavaVersion.VERSION_1_8
1111
sourceCompatibility = JavaVersion.VERSION_1_8

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/sys/logging/StreamableLogNode.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected void write(LogRecord record) {
6767
String recordMsg = encodeLogRecord(record);
6868
DSDateTime ts = DSDateTime.valueOf(record.getMillis());
6969
if (levelMatches(recordLevel, level.toLevel()) &&
70-
(name == null || name.isEmpty() || name.equals(recordName)) &&
70+
(name == null || name.isEmpty() || logNameMatches(recordName, name)) &&
7171
(filter == null || filter.isEmpty() || recordMsg.matches(filter))) {
7272

7373
while (lines.size() > 1000) {
@@ -158,6 +158,10 @@ private static String encodeLogRecord(LogRecord record) {
158158
public static boolean levelMatches(Level msgLevel, Level desiredLevel) {
159159
return msgLevel.intValue() >= desiredLevel.intValue();
160160
}
161+
162+
public static boolean logNameMatches(String msgLogName, String desiredLogName) {
163+
return msgLogName != null && msgLogName.startsWith(desiredLogName);
164+
}
161165

162166
static {
163167
levelRange = new DSList();

0 commit comments

Comments
 (0)