Example #1
0
    void rollover() const {
        const std::string& filename = backend.filename();
        const std::string& basename = generator.transform(filename);

        if (counter.valid()) {
            rollover(backend.listdir(), basename);
        }

        if (backend.exists(filename)) {
            backend.rename(filename, backup_filename(basename));
        }
    }
Example #2
0
void AssertionCount::condrollover(int newvalue) {
    static const int rolloverPoint = (1 << 30);
    if (newvalue >= rolloverPoint)
        rollover();
}
Example #3
0
 void AssertionCount::condrollover( int newvalue ){
     static int max = (int)pow( 2.0 , 30 );
     if ( newvalue >= max )
         rollover();
 }
Example #4
0
 void rotate() const {
     backend.flush();
     backend.close();
     rollover();
     backend.open();
 }