mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-24 23:15:39 +00:00
Check logging level first for log() function for efficiency
This commit is contained in:
parent
2e1a461855
commit
c8fcabec02
|
@ -17,6 +17,7 @@
|
||||||
# log i "par" rekku.log -> logs an information with message in the specified log file inside the logs folder retrodeck/logs/rekku.log
|
# log i "par" rekku.log -> logs an information with message in the specified log file inside the logs folder retrodeck/logs/rekku.log
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
|
if [[ ! $logging_level == "none" ]]; then
|
||||||
|
|
||||||
local level="$1"
|
local level="$1"
|
||||||
local message="$2"
|
local message="$2"
|
||||||
|
@ -85,7 +86,7 @@ log() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ ! $logging_level == "none" ]]; then
|
|
||||||
# Display the message in the terminal
|
# Display the message in the terminal
|
||||||
echo -e "$colored_message" >&2
|
echo -e "$colored_message" >&2
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue