Mikie Posted April 25, 2019 Share 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 ? Link to comment Share on other sites More sharing options...
adrian Posted April 25, 2019 Share 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 Link to comment Share on other sites More sharing options...
bernhard Posted April 25, 2019 Share 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 Link to comment Share on other sites More sharing options...
Mikie Posted April 26, 2019 Author Share Posted April 26, 2019 Awesome thanks. Link to comment Share on other sites More sharing options...
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