mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-28 16:45:42 +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() {
|
||||
if [[ ! $logging_level == "none" ]]; then
|
||||
|
||||
local level="$1"
|
||||
local message="$2"
|
||||
|
@ -85,7 +86,7 @@ log() {
|
|||
;;
|
||||
esac
|
||||
|
||||
if [[ ! $logging_level == "none" ]]; then
|
||||
|
||||
# Display the message in the terminal
|
||||
echo -e "$colored_message" >&2
|
||||
|
||||
|
|
Loading…
Reference in a new issue