I thought there would be a System Setting for that, but it looks like it's not possible without hacking the MODX core.
thanks bob for the reply, if I hack in the MODX core is there any bad effect in my website? and how should I hack in to modx core?
[ed. note: johnrobert27 last edited this post 12 years, 1 month ago.]
-
☆ A M B ☆
- 24,524 Posts
You could break the site if there are errors in your code.
When you upgrade to a newer version of MODX your modifications will be lost.
Why do you want a custom log file path? If you want to store the file, you could create a utility snippet or CMP to move the file, appending it to your previously moved file. You could even create a system cron job for doing it automatically.
I think what you want is a plugin attached to OnWebPagePrerender with something like your code above. The pagetitle, alias, and ID are available like this (assuming it's MODX Revolution):
$id = $modx->resource->get('id');
$pagetitle = $modx->resource->get('pagetitle');
$alias = $modx->resource->get('alias');
BTW, I wouldn't use the MODX log. I'd just write to a file.
Note that you'll get lots of hits from search engines and some from would-be hackers.
Or you could just use Google Analytics.
-
☆ A M B ☆
- 24,524 Posts
Quote from: johnrobert27 at Aug 29, 2014, 02:06 AMwhat would be the problem if i am using modx log?
No problem, it's just easier and faster to create your own file, imo. It's also good form when you use the MODX log to store the current log level and log target if you change them, and restore them after you're done logging.