Skip to content

Commit

Permalink
refactor(cron_cve): print info and debug when in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Lea9250 committed Oct 11, 2023
1 parent b7c79ea commit 381d3cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion require/cve/Cve.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,12 @@ public function clean_cve($publisher){

/**
* Print debug statement depending on the level of debug needed
* If in debug mode, print all messages, if only verbose mode, print only INFO
* @param string $string
* @param string $level
*/
public function verbose($string, $level) {
if (($level == "DEBUG" && $this->CVE_DEBUG) || ($level == "INFO" && $this->CVE_VERBOSE)) {
if (($level == "DEBUG" && $this->CVE_DEBUG) || ($level == "INFO" && ($this->CVE_VERBOSE || $this->CVE_DEBUG))) {
print("[".date("Y-m-d H:i:s"). "] [$level] $string\n");
}
}
Expand Down

0 comments on commit 381d3cf

Please sign in to comment.