MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / GetRotationDescription

Method GetRotationDescription

source/fdb.cpp:269–305  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

267}
268//---------------------------------------------------------------------------
269String TStorageFile::GetRotationDescription(void)
270{
271 String s;
272 String m;
273 switch( rotation_type )
274 {
275 case 0: s = "off"; break;
276 case 1:
277 switch( rotation_mult )
278 {
279 case 0: m = "KB"; break;
280 case 1: m = "MB"; break;
281 case 2: m = "GB"; break;
282 }
283 s = String("by size ") + IntToStr(rotation_size) + " " + m;
284 break;
285 case 2:
286 switch( rotation_moment )
287 {
288 case 0: m = "day"; break;
289 case 1: m = "week"; break;
290 case 2: m = "month"; break;
291 case 3: m = "year"; break;
292 }
293 s = String("by ") + m + " " + IntToStr(rotation_hour) + " hour";
294 break;
295 }
296 if( rotation_type > 0 )
297 switch( rotation_renaming )
298 {
299 case 0: s += String(", ") + ExtractFileName(file) + "[1.." +
300 IntToStr(rotation_count) + "]"; break;
301 case 1: s += String(", ") + rotation_name +
302 " [" + IntToStr(rotation_count) + "]"; break;
303 }
304 return s;
305}
306//---------------------------------------------------------------------------
307void TStorageFile::Save(XMLElementEx * p)
308{

Callers 1

DrawGridDrawCellMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected