Code Coverage by Clover.NET

W3C Extended Log File Format

View: New views
1 Messages — Rating Filter:   Alert me  

W3C Extended Log File Format

by khoinm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone!

I'm trying to create new target for NLog follow the W3C Extended Log File Format.
Follow the W3C Log file format http://www.w3.org/TR/WD-logfile.html, a log file has some directive like Fields, Version, Date, Start-Date, End-Date,...One of the most important directive is the Fields. It describes the format of the field in each entry so other Log parse tools can understand. And it should should precede all entries in the log.

I had modify the File target for my purpose but i have problem while modified the  private void WriteToFile(string fileName, byte[] bytes, bool justData) procedure. It's quite complicated.

I want each log file will have only one line of Fields's directive precede all entries in the log file.

Could someone help me solve this problem?
Thanks you very much!