FileLogger Class |
Namespace: GroupDocs.Search.Common
The FileLogger type exposes the following members.
Name | Description | |
---|---|---|
![]() | FileLogger |
Initializes a new instance of the FileLogger class.
|
Name | Description | |
---|---|---|
![]() | FilePath |
Gets the log file path.
|
![]() | MaxSize |
Gets the maximum size of log file in megabytes.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Error |
Logs an error that occurred in the index.
|
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
![]() | Trace |
Logs an event that occurred in the index.
|
string indexFolder = @"c:\MyIndex\"; string documentsFolder = @"c:\MyDocuments\"; string query = "Einstein"; string logPath = @"c:\Log.txt"; IndexSettings settings = new IndexSettings(); settings.Logger = new FileLogger(logPath, 4.0); // Specifying the path to the log file and a maximum length of 4 MB Index index = new Index(indexFolder, settings); // Creating an index in the specified folder index.Add(documentsFolder); // Indexing documents from the specified folder SearchResult result = index.Search(query); // Search in index