DevLog Class |
Namespace: NetQuarry
The DevLog type exposes the following members.
Name | Description | |
---|---|---|
DevLogOptions |
Returns the options for logging from the current log settings.
| |
Filename |
Gets the filename currently being used by the DevLog.
| |
IsDebugLogging |
Returns true if the devlog is logging debug type messages
| |
IsInitialized |
Returns True if the log has been initialized
| |
IsOpen |
Returns true if the log file is open
| |
LogOptions |
Returns the options for logging from the current log settings.
|
Name | Description | |
---|---|---|
Close |
Closes the current log and the underlying stream.
| |
DateFromJavaTimestamp |
Convert a date/time in millseconds since 1970 (in UTC) as used in java and
the devlog, into a corresponding .Net DateTime value in the server-local TZ.
| |
DateToJavaTimestamp |
Convert a date/time to milliseconds since 1970 (in UTC) which is what java
uses and what we've always logged to the devlog.
| |
Dispose |
Close the database connection(s)
| |
Equals | (Inherited from Object.) | |
Finalize |
destructor
(Overrides ObjectFinalize.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InitDevLog(String) |
Overloaded. Initilize the log with default options, size, and backup file count.
| |
InitDevLog(String, DevLogOptions) |
Overloaded. Initilize the log with default size and backup file count.
| |
InitDevLog(String, DevLogOptions, Int32, Int32) |
Initilize the log.
| |
LogMessage(String, String, Exception) |
Logs an exception to the DevLog
| |
LogMessage(String, String, String, LogMessageLevel) |
Logs a warning to the devlog
| |
LogMessage(String, String, String, LogMessageLevel, LogCategory) |
Logs a warning to the devlog
| |
LogMessage(String, String, String, String, LogMessageLevel) |
Logs a warning to the devlog
| |
LogMessage(String, String, String, LogMessageLevel, LogCategory, Guid) |
Logs a warning to the devlog
| |
LogMessage(String, String, String, String, LogMessageLevel, LogCategory, Guid) |
Logs a warning to the devlog
| |
ReadPageLog |
Extract the XML for the specified thread and timespan from the current devlog.
| |
ToString | (Inherited from Object.) | |
Truncate |
Truncate the current devlog.
|
Name | Description | |
---|---|---|
DEFAULT_LOGFILE_MAXSIZE | Maximum size for a log file in bytes | |
DEFAULT_MAX_BACKUP_FILES | Default max number of backup files | |
DEFAULT_TRUNCATE_SPIN_COUNT | Number of times to spin without checking max size |
Name | Description | |
---|---|---|
EqualValue |
Determines if the object value is equal to another object. If the two objects are null, then this returns true.
There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways).
If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.) |
The DevLog (developer log) is configured in the application's configuration file (typically web.config). You may specify in the config file various options that control the verbosity and handling of the log file.
Options for the log from the DevLogOptions enumeration. This value should be a decimal number that represents a bitmask of one or more of the DevLogOptions values.
For example, to turn off Debug level logs, set the value to 1.
Note |
---|
If you are running in the context of IIS then the logfile is specified in the web.config file. If you are running in the context of the Scheduler, then the logfile is specified in the EAP.Scheduler.exe.config file. |
try { //--- leave the From field empty, it will default to the value configured in the studio mail.Send(string.Empty, sendToList, subject, body, true); } catch (Exception ex) { //--- log the error then re-throw DevLog.LogMessage("XIssue.Send", "sendMailError", ex); throw; }
DevLog.LogMessage("AppContext.Hibernate", "applicationHibernate", string.Format("Application database connections are being closed. InitStack = {0}", _initSemaphore), LogMessageLevel.Debug);