my_logger: make the tag optional

This commit is contained in:
ljm42
2024-02-02 13:02:40 -07:00
parent 551f85ad92
commit 0287d8dfac
7 changed files with 12 additions and 12 deletions

View File

@@ -146,7 +146,7 @@ function my_date($fmt, $time) {
return date(strtr($fmt,$legacy), $time);
}
// ensure params passed to logger are properly escaped
function my_logger($tag, $message) {
function my_logger($message, $tag="webgui") {
exec('logger -t '.escapeshellarg($tag).' -- '.escapeshellarg($message));
}
?>