Click here to Skip to main content
15,564,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi team,

i've got the difficulty to generate log file, i mean when exceed 100 KB it will generate file.txt, file(1).txt, file(2).txt

i need your help for give solution from those case
Posted
Comments
Andy Lanng 27-May-15 4:40am    
How do you write to the file? Do you keep the file open or do you need to find the file each time you write to it?

Show us your code and tell us what you have tried

1 solution

why not using existing logging tool like log4net? you can easily configure the maximum log file size using connfiguration settings.

refer : Maximum Filesize of LogFileAppender in Log4Net[^]
A Brief Introduction to the log4net logging library, using C#[^]
log4net Tutorial[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900