Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in web.config file loggingconfiguration section listeners how to get file name as current date.

its like C:\LOG\(currentdate)\trace.log. how to get floder name as a current date .
Posted
Comments
[no name] 2-Jun-10 13:47pm    
Please clarify what you are asking for

1 solution

Everytime a log entry is made.

You check whether a folder by name <currentdate> exists in "C:\LOG\" Location.
If yes. Then check whether trace.log exists.
If yes. append the text to trace.log.
Else create trace.log file.
Else
Create a folder by name current date in location "C:\LOG\" and write the log.

I hope you know how to get the current date.
 
Share this answer
 
v2

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