We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A newbie question here.
Suppose I have:
import scribe._ import scribe.file._ class MyClass { Logger.root .clearHandlers() .clearModifiers() .withHandler(minimumLevel = Some(Level.Info)) .withHandler(writer = new FileWriter("./log.txt")) .replace() doSomething() def doSomething(): Unit = { scribe.info("I did something!") val x = 1/0 } }
How will I capture and redirect to log file the stderr (exception in this case)?
The text was updated successfully, but these errors were encountered:
The easiest solution is just to call:
Logger.system.redirect()
That will redirect System.out and System.err to be logged.
System.out
System.err
Sorry, something went wrong.
Thank you very much, really appreciate your help!
No branches or pull requests
A newbie question here.
Suppose I have:
How will I capture and redirect to log file the stderr (exception in this case)?
The text was updated successfully, but these errors were encountered: