HerikLyma / CPPWebFramework

​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
MIT License
445 stars 119 forks source link

log file, set max size? #2

Closed tirolel closed 7 years ago

tirolel commented 7 years ago

I just find out that the log file can grow and be a really huge file.
is there any configuration I can limit the file size?

HerikLyma commented 7 years ago

Hi Tirolel,

In this version it is not possible to limit the size of the log file. We will check this for future versions.

Thank you.

tirolel commented 7 years ago

Okay. I see. For now I have implemented a variable in the ini file with log max size. and in "cppwebapplication.cpp" after line 66, I added: if(file.size() > configuration.logMaxSize) { file.resize(0); };

so I clear the log once it reaches to the maximum size that given.

HerikLyma commented 7 years ago

Thank you very much Tirolel.

We will implement this feature.