Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status command text contains log output #206

Open
Digital-Chaos opened this issue Apr 14, 2017 · 5 comments

Comments

2 participants
@Digital-Chaos
Copy link

commented Apr 14, 2017

$ winsw status
The above command now emits INFO logging text in addition to the expected service status string due to ConsoleLogger being enabled if in "cli mode" (which seems to be if you have args > 0)??? There also seems no way to disable this logging from the configuration?

@Digital-Chaos Digital-Chaos changed the title Status command Status command text contains logging info Apr 14, 2017

@Digital-Chaos Digital-Chaos changed the title Status command text contains logging info Status command text contains log output Apr 14, 2017

@oleg-nenashev

This comment has been minimized.

Copy link
Collaborator

commented Apr 14, 2017

Not for now. #158 should add support of it.

BTW I doubt that "status" command will ever guarantee to provide a short output since there is some long-term plan to have more diagnostics there. What is your use-case? Is it for monitoring?

@Digital-Chaos

This comment has been minimized.

Copy link
Author

commented Apr 14, 2017

The current docs on the front page say that the status command will return one line which indicates the status of the service with values of "NonExistant", "Started", or "Stopped", which is no longer true.

Our use case is that we have automated deployment of a Spring Boot app in which we have an initial powershell step which checks the state of the service (utilizing the result of the winsw status command) and then stops it if running. There is also a final step after deployment to check for the existance of the service (again using winsw status) and install it if necessary and then start the service.

Why change the exisitng "status" command to add extra diagnostics output and potentially cause breakage for existing users when you could add an additional command such as "winsw diagnotics" or something similiar and avoid breaking anything?

@oleg-nenashev

This comment has been minimized.

Copy link
Collaborator

commented Apr 18, 2017

If it is documented, I agree it should behave in the described way. Adding it to the 2.2 scope

@Digital-Chaos

This comment has been minimized.

Copy link
Author

commented Apr 18, 2017

Much appreciated, and thank you for your time and effort on this project! :-)

oleg-nenashev added a commit to oleg-nenashev/winsw that referenced this issue Apr 25, 2017

[Issue kohsuke#206] - Prevent printing of logs to the status command
This is rather a workaround to prevent printing of log messages in CLI with the default logging level. I reduced CLI logging verbosity to "Info" and moved the messages polluting the output to Debug. Anyway, these logging levels seem to be reasonable. I also added Info logging for start/stop/install/restart commands just to have a welcome message in CLI.

oleg-nenashev added a commit that referenced this issue May 3, 2017

Merge pull request #214 from oleg-nenashev/Issue206_status_log
[Issue #206] - Prevent printing of logs in the status command

pnikonowicz pushed a commit to greenhouse-org/winsw that referenced this issue May 17, 2017

[Issue kohsuke#206] - Prevent printing of logs to the status command
This is rather a workaround to prevent printing of log messages in CLI with the default logging level. I reduced CLI logging verbosity to "Info" and moved the messages polluting the output to Debug. Anyway, these logging levels seem to be reasonable. I also added Info logging for start/stop/install/restart commands just to have a welcome message in CLI.
@oleg-nenashev

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2017

Released in 2.1.1.
Sorry for the delay. I should spend more time on establishing Continuous Delivery in my projects :(

oleg-nenashev added a commit to oleg-nenashev/windows-slave-installer-module that referenced this issue Aug 17, 2017

[JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2
Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation.
Also updates Parent POM in the module

Full list of fixes:

- JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter
- [WinSW Issue #206](kohsuke/winsw#206) - Prevent printing of log entries in the `status` command
- [WinSW Issue #218](kohsuke/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process

Full Diff: kohsuke/winsw@winsw-v2.1.0...winsw-v2.1.2

oleg-nenashev added a commit to oleg-nenashev/jenkins that referenced this issue Aug 17, 2017

[JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2
Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation.
Also updates Parent POM in the module

Full list of fixes:

- JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter
- [WinSW Issue jenkinsci#206](kohsuke/winsw#206) - Prevent printing of log entries in the `status` command
- [WinSW Issue jenkinsci#218](kohsuke/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process

Full Diff: kohsuke/winsw@winsw-v2.1.0...winsw-v2.1.2

oleg-nenashev added a commit to jenkinsci/jenkins that referenced this issue Aug 19, 2017

[JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2 (#2987)
* [JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2

Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation.
Also updates Parent POM in the module

Full list of fixes:

- JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter
- [WinSW Issue #206](kohsuke/winsw#206) - Prevent printing of log entries in the `status` command
- [WinSW Issue #218](kohsuke/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process

Full Diff: kohsuke/winsw@winsw-v2.1.0...winsw-v2.1.2

* [JENKINS-46282] - Pick the released version of Windows Agent Installer

hplatou added a commit to hplatou/jenkins that referenced this issue Aug 21, 2017

[JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2 (jenkinsci#2987)
* [JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2

Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation.
Also updates Parent POM in the module

Full list of fixes:

- JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter
- [WinSW Issue jenkinsci#206](kohsuke/winsw#206) - Prevent printing of log entries in the `status` command
- [WinSW Issue jenkinsci#218](kohsuke/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process

Full Diff: kohsuke/winsw@winsw-v2.1.0...winsw-v2.1.2

* [JENKINS-46282] - Pick the released version of Windows Agent Installer

olivergondza added a commit to jenkinsci/jenkins that referenced this issue Sep 4, 2017

[JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2 (#2987)
* [JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2

Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation.
Also updates Parent POM in the module

Full list of fixes:

- JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter
- [WinSW Issue #206](kohsuke/winsw#206) - Prevent printing of log entries in the `status` command
- [WinSW Issue #218](kohsuke/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process

Full Diff: kohsuke/winsw@winsw-v2.1.0...winsw-v2.1.2

* [JENKINS-46282] - Pick the released version of Windows Agent Installer

(cherry picked from commit 100202c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.