14 lines
382 B
Bash
14 lines
382 B
Bash
#!/bin/bash
|
|
|
|
function log_info() {
|
|
echo "{\"timestamp\": \"$(date)\", \"level\": \"INFO\", \"message\": \"$1\"}" >> $LOG_FILE
|
|
}
|
|
|
|
function log_error() {
|
|
echo "{\"timestamp\": \"$(date)\", \"level\": \"ERROR\", \"message\": \"$1\"}" >> $LOG_FILE
|
|
}
|
|
|
|
function log_critical() {
|
|
echo "{\"timestamp\": \"$(date)\", \"level\": \"CRITICAL\", \"message\": \"$1\"}" >> $LOG_FILE
|
|
}
|