Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
3 posts Page 1 of 1
Optimized solution for viewing in browser the log files.

Code: Select all
'file'=>'log-'.date( "n-j" ).'.html'


By default, without file parameter, logfile will be created in root of website with the name log-11-17.html, with current month-date( log-{m}-{d}.html ).
Using with both options( with file parameter or without ):
Code: Select all
<cms:log variable />
<cms:log "<cms:dump_all />" />
<cms:log variable file='some-better-name.log' />
Added a little mod to skip message( msg ) completely. That part:
Code: Select all
...
      if( !trim($msg) ){
         $msg = new KTags();
         $msg = $msg->dump_all( $params, $node );
      }
...

or would be even better with
...
      if( !trim($msg) ){
         global $TAGS;
         $msg = $TAGS->dump_all( $params, $node );
      }
...

Usage is super-simple:
Code: Select all
<cms:log />
// instead of
<cms:log "<cms:dump_all />" />
Updated with working solution for logging dump_all instead of empty message.
ScreenCut-12-06---12-19-22-.png
Autonaming
ScreenCut-12-06---12-19-22-.png (1.72 KiB) Viewed 2787 times
3 posts Page 1 of 1