Claims In this invention, we provide application level logging by maintaining a bitmap where there is one bit per application identifier or process identifier mapping to a file pointer pointing to a file for writing. The above capability is provided in the form of a library. Also, each thread of the process or application registers with the library before writing to the log file. Hence only one thread per application or process is allowed to write to a file by accessing its corresponding mapped region from the bitmap and it does so by atomically setting the corresponding bit for the process or application in the bitmap to value 1. In addition to this, the library marks the memory region of the file for reading in case write is being performed on the file. This way application threads wanting to read the log file can read it till the marked region simultaneously while write is happening to the file. |
In this invention, we provide application level logging by maintaining a bitmap where there is one bit per application identifier or process identifier mapping to a file pointer pointing to a file for writing. The above capability is provided in the form of a library. Also, each thread of the process or application registers with the library before writing to the log file. Hence only one thread per application or process is allowed to write to a file by accessing its corresponding mapped region from the bitmap and it does so by atomically setting the corresponding bit for the process or application in the bitmap to value 1. In addition to this, the library marks the memory region of the file for reading in case write is being performed on the file. This way application threads wanting to read the log file can read it till the marked region simultaneously while write is happening to the file.