Skip to content
  • Final version is using this:

    echo "\"`date -u +%FT%H:%M:%S.%3N`\": [[\"${LOGGING}\", \"`hostname`\", \"${APP_NAME}\", \"$$\", \"${CONTEXT1}\"], {\"Event\":\"${MESSAGE}\"}]" >> ${LOGFILE}
    

    Output:

     ["2018-03-13T23:11:30.804",0,0]	"INFO"
     ["2018-03-13T23:11:30.804",0,1]	"HOSTNAME"
     ["2018-03-13T23:11:30.804",0,1]	"APP.sh"
     ["2018-03-13T23:11:30.804",0,3]	"26118"
     ["2018-03-13T23:11:30.804",0,4]	"7294"
     ["2018-03-13T23:11:30.804",1,"Event"]	"Application run complete"
    
    Edited by Chris Hubbard
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment