Keeping all SQL Server logs I can not find my SQL Server logs for all days in the past. In only found for last 4 days. Is it because that I restarted the server and logs are dumped if the hosting server is restarted?

How can I keep entire logs?

I am using the GUI to view the logs.
You have to configure  using SSMS GUI :



Make sure you have error logs set to manageable size.

Check MSDN : Configure SQL Server Error Logs and kb 2199578 for managing SQL Server error log.

EDIT:

Below is what we do in our PROD environments:


Recycle error logs using master.sys.sp_cycle_errorlog with a SQL Agent job.
If you need more than 99 days of log (since you mentioned in your comment - The maximum is 99 which will be reached very soon), you can use PowerShell to move the files to a safe location. I would doubt that you would need error logs past 99 days ! Just make sure that you keep them in a manageable size, else you it would be difficult for log viewer to open very large files.