Skip to content

Commit 1064658

Browse files
fix: don't assume new log_level setting was defaulted (#831)
1 parent f99be56 commit 1064658

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/BaseTraits.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ trait BaseTraits {
5353

5454
# If the log level has not been set yet, obtain it
5555
if (!isset(self::$__log_level)) {
56-
self::$__log_level = constant(RESTAPISettings::get_pkg_config()['log_level']) ?? 4;
56+
$log_lvl_cfg = RESTAPISettings::get_pkg_config()['log_level'] ?? 'LOG_WARNING';
57+
self::$__log_level = constant($log_lvl_cfg);
5758
}
5859

5960
# Do not log if the incoming level is higher than the configured log level

0 commit comments

Comments
 (0)