Nakarin, this way you can only define timed rotation (by means of action => if_elapsed or by classes), but not size-based rotation. To define size-based rotation, I use file_select, but it wants depth_search from me. I believe, depth_search requirement must be suppressed for file promises.
2010/6/4 Nakarin Phooripoom <[email protected]>: > Do we really need to include depth_search to rotate a file? > > file: > "/var/cfengine/promise.log" > rename => rotate("3"); > > Cheers, > --Nakarin > > On Jun 4, 2010, at 8:46 AM, Seva Gluschenko wrote: > >> Hello folks, >> >> When I wrote a promise to rotate /var/cfengine/promise.log (BTW, why >> Cfengine doesn't rotate it?), cf-promises warned me about using rename >> body without depth_search body. Well, okay, despite I was surprised >> with such a requirement, I've added depth_search => recursion("1"). >> Now (with 3.0.5b2), executor sends me messages with the following >> warning: >> >> Warning: depth_search (recursion) is promised for a base object >> /var/cfengine/promise.log that is not a directory >> >> So how do I get rid of warnings? Can depth_search be removed now or so? >> >> -- >> SY, Seva Gluschenko. >> _______________________________________________ >> Help-cfengine mailing list >> [email protected] >> https://cfengine.org/mailman/listinfo/help-cfengine > > -- SY, Seva Gluschenko. _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
