You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/07/30 05:30:46 UTC

[incubator-nlpcraft] branch master updated: Quick fix.

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new 9cc0dc9  Quick fix.
9cc0dc9 is described below

commit 9cc0dc9855fa00bf732e354f3012f4cc85a49268
Author: Aaron Radzinzski <ar...@datalingvo.com>
AuthorDate: Thu Jul 29 22:30:08 2021 -0700

    Quick fix.
---
 nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala      | 2 +-
 .../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala
index 1fb257c..ee0f1d8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCService.scala
@@ -110,7 +110,7 @@ abstract class NCService extends LazyLogging with NCOpenCensusTrace {
      * @return
      */
     private def padDur(ms: Long): String =
-        StringUtils.rightPad(s"${U.now() - ms}ms", 6)
+        StringUtils.leftPad(s"${U.now() - ms}ms", 6)
 
     /**
      * Acks started service. Should be called at the end of the `start()` method.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala
index 020540f..21c022c 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala
@@ -55,7 +55,7 @@ class NCCliBase extends App {
     )
 
     //noinspection RegExpRedundantEscape
-    final val TAILER_PTRN = Pattern.compile("^.*\\[[\\d]+ms(\\s)*\\]\\s*NC[a-zA-Z0-9]+(\\s*)started\\.$")
+    final val TAILER_PTRN = Pattern.compile("^.*\\[(\\s)*[\\d]+ms\\]\\s*NC[a-zA-Z0-9]+(\\s*)started\\.$")
     final val CMD_NAME = Pattern.compile("(^\\s*[\\w-]+)(\\s)")
     final val CMD_PARAM = Pattern.compile("(\\s)(--?[\\w-]+)")