Skip to content

Commit

Permalink
[repl] Add debugLog function to enable debug log output
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Jun 19, 2024
1 parent 9f88e47 commit 4e18af0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions minidns-repl/scala.repl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ import org.minidns.jul.MiniDnsJul._

import java.net.InetAddress

import java.util.logging._

def debugLog() = {
val miniDnsLogger = Logger.getLogger("org.minidns")
miniDnsLogger.setLevel(Level.FINE)
val consoleHandler = new ConsoleHandler()
consoleHandler.setLevel(Level.FINE)
miniDnsLogger.addHandler(consoleHandler)
}

// Some standard values
Predef.println("Set value 'c' to DNSClient")
val c = org.minidns.minidnsrepl.MiniDnsRepl.DNSCLIENT
Expand All @@ -33,4 +43,5 @@ val dr = org.minidns.hla.DnssecResolverApi.INSTANCE
Predef.println("Enjoy MiniDNS. Go ahead and try a query. For example:")
Predef.println("c query (\"geekplace.eu\", TYPE.A)")
Predef.println("dr resolveDnssecReliable (\"verteiltesysteme.net\", classOf[A])")
Predef.println("NOTE: You can enable debug log output by calling 'debugLog'")

0 comments on commit 4e18af0

Please sign in to comment.