My requirement is to write logs to a fixed size text file. I have gone through few articles regarding this but those are looking bit complex for me since I am new to programming.
As per my knowledge what I think I can do is write log data to a queue which is fixed size and when the queue is about to overflow then dequeue the old log data and enqueue new log data. At the end dump the entire queue data to a log text file.
Is it suggestible solution or any other better way for this?