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

Add convenience Revolver.disableDebugging method #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ To enable debugging with the specified options:

Revolver.enableDebugging(port = 5050, suspend = true)

To disable debugging:

Revolver.disableDebugging

To change set of colors used to tag output from multiple processes:

reColors := Seq("blue", "green", "magenta")
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/spray/revolver/RevolverPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ object RevolverPlugin extends AutoPlugin {
def enableDebugging(port: Int = 5005, suspend: Boolean = false) =
debugSettings in reStart := Some(DebugSettings(port, suspend))

def disableDebugging =
debugSettings in reStart := None

def noColors: Seq[String] = Nil
def basicColors = Seq("BLUE", "MAGENTA", "CYAN", "YELLOW", "GREEN")
def basicColorsAndUnderlined = basicColors ++ basicColors.map("_"+_)
Expand Down
1 change: 1 addition & 0 deletions src/sbt-test/sbt-revolver/env-vars/test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
> set Revolver.disableDebugging
> reStart
$ sleep 2000
$ exec curl http://0.0.0.0:8888
Expand Down