Edward Coast
Edward Coast

Reputation: 384

Is there a logger function from php or should this be written using exec?

On linux in shell programming I use to being able to use the logger command to write the system log. Is there the equivalent function to do this from PHP? Or is it common practice to use exec("logger...") to do this?

Upvotes: 0

Views: 78

Answers (1)

vr_driver
vr_driver

Reputation: 2085

It's easy to fill a system log with errors when you break code - been there, done that. :)

However you can either make your own logging system, or maybe have a look here: http://php.net/manual/en/function.syslog.php

Upvotes: 1

Related Questions