Mikie Posted April 25, 2019 Posted April 25, 2019 Hey, what's best practice for saving logs generated by a module? Like if I'm making a module that requires logging for reference, do I save to site/assets/modulename/logfile.text or site/assets/logs/logfile.txt ?
adrian Posted April 25, 2019 Posted April 25, 2019 $log->save('modulename', 'message to log'); will take care of it for you, putting it in /site/assets/logs/modulename.txt 3
bernhard Posted April 25, 2019 Posted April 25, 2019 Or just use $this->log('foo bar'); https://processwire.com/blog/posts/processwire-core-updates-2.5.15/#new-log-and-this-gt-log-text-api-functions 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now