Closed markusjura closed 9 years ago
Looking good.
Alrighty, the format has been optimized for the logs
and events
command. In case the log or event message length is less than the column width it will look like this:
If the length of the text is longer than the column width we will wrap the text and add at the end of the message an additional new line for readability reasons:
Note: The last character of the log messages of conduct logs
is currently a new line. This will be fixed in another PR.
@huntc: The travis test is failing because it runs the tests with Java 7, but I've used the java.time.*
objects introduced in Java 8.
Should we support Java 7 for sbt-conductr
as well? I guess if conductr has Java 8 as a prerequisite itself we should we fine to use Java 8 objects in sbt-conductr
. WDYT?
The plugins themselves require Java 7 to support Play 2.3 and Akka 2.3 users. It would have been Java 6 but the native packager brought us to 7.
Used joda-time
2.8.2 instead of java.time.*
to be Java 7 compatible.
Log messages will look now like this:
Downside Copy & Paste this wrapped text into a text editor leads to spaces in the text between the new lines.
Looking good!
How come the msg isn't being parsed for those columns being wrapped though?
With parsing you mean that we should, e.g. apply json parsing if the log message has a json format? So far no parsing is applied. Only formatting, so that the wrapping only happens within the same column.
Sorry for any confusion. I'm curious as to why the multiline logs are showing as JSON, but the others don't. Is this the same output as the python CLI?
Kibana always produces JSON as log messages. The first 3 lines are part of the Kibana start script.
It is the same output as on the python CLI.
Removed the ex
from the Status.Failure
. Ready to get merged?
Thanks for the explanations. Lgtm.
Implementation of the commands
events
andlogs
. Syntax:The last parameter 50 is optional and tells how many lines should be displayed.
The logs and events are getting retrieved. However, the PR isn't finished yet. Missing pieces are:
Also refactored the
src/main/scala/com/typesafe/conductr/client/ConductRController.scala
by encapsulating duplicated code into methods.