mirror of
https://gitee.com/ja-netfilter/ja-netfilter.git
synced 2024-11-16 23:49:38 +08:00
add a DebugInfo switch
Signed-off-by: pengzhile <pengzhile@gmail.com>
This commit is contained in:
parent
c9dc6b4abb
commit
3fc69ee29f
@ -49,4 +49,5 @@ EQUAL,somedomain
|
||||
## Debug info
|
||||
|
||||
* the `ja-netfilter` will **NOT** output debugging information by default
|
||||
* add environment variable `JANF_DEBUG=1` and start to enable it
|
||||
* add environment variable `JANF_DEBUG=1` and start to enable it
|
||||
* or add system property `-Djanf.debug=1` to enable it
|
@ -3,7 +3,7 @@ package io.zhile.research.ja.netfilter.commons;
|
||||
import io.zhile.research.ja.netfilter.utils.DateUtils;
|
||||
|
||||
public class DebugInfo {
|
||||
private static final boolean DEBUG = "1".equals(System.getenv("JANF_DEBUG"));
|
||||
private static final boolean DEBUG = "1".equals(System.getenv("JANF_DEBUG")) || "1".equals(System.getProperty("janf.debug"));
|
||||
|
||||
public static void output(String content) { // No logger lib required
|
||||
if (!DEBUG) {
|
||||
|
Loading…
Reference in New Issue
Block a user