# NOT RUN {
open_syslog("my_script")
syslog("Running script.", level = "INFO")
syslog("Possible issue.", level = "WARNING")
close_syslog()
# Opening the syslog is not strictly necessary. You can
# simply write a message and it will open the log with the
# process name (likely "R") as the default.
syslog("Hello from R!", level = "WARNING")
close_syslog()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab