Commit Graph
12 Commits
Author SHA1 Message Date
Zoltan Varga 17edd267ab [bcl] Use List instead of ArrayList () in a few places. 2014-10-08 16:12:01 -04:00
Miguel de Icaza f48ceb9860 [System] Removal of the NET_2_0 in the source code
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
2012-06-02 13:16:40 -04:00
Paolo Molaro bd23e8ade8 Changes to follow PlatformID corlib changes.
svn path=/trunk/mcs/; revision=115659
2008-10-13 15:04:34 +00:00
Gert Driesen 1c14498de3 * LocalFileEventLog.cs: To allow entry to be fully written before
attempting to read it, added small sleep period in the Created event
of the FSW.

svn path=/trunk/mcs/; revision=90994
2007-12-08 16:02:41 +00:00
Atsushi Eno 5ccf103008 2007-09-05 Atsushi Enomoto <[email protected]>
* EventLog.cs, EventLogImpl.cs, LocalFileEventLog.cs, NullEventLog.cs,
	  Win32EventLog.cs : added missing members, will be left unsupported
	  in non-Win32 impl and left unimplemented in Win32.
	* CounterCreationDataCollection.cs : in 2.0 OnValidate() is overriden
	  instad of OnInsert().
	* Process.cs : removed StandardErrorEncoding and
	  StandardOutputEncoding. They do not exist anymore.


svn path=/trunk/mcs/; revision=85336
2007-09-05 08:57:02 +00:00
Gert Driesen b5039e39d7 * EventLog.cs: Do not allow all whitespace machine name. Do nothing
when setting the same value for EnableRaisingEvents, and only modify
value of field when enable/disable succeeded. Treats log name case
insensitively on all platforms, and perform reset when the log name
is changed. Validate new machine name in property, and treat it
case-insensitively. Perform reset when source is modified, and log
name was not explicitly set. When EventLog is closed, also disable
event watcher.
* LocalEventLog.cs: In Close, clean-up the FileSystemWatcher. Add
locking to Created eventhandler to avoid duplicate notifications.
* Win32EventLog.cs: Cache handle for reading from eventlog. In Close,
close the read handle. Implement support for watching win32 eventlog.
Fixes bug #82436.
* EventLogTest.cs: Added tests for validity of machine name. Added
tests for case-insensitivity of Source, Log and MachineName.

svn path=/trunk/mcs/; revision=84049
2007-08-14 11:23:24 +00:00
Atsushi Eno 4ecf370fff 2007-08-02 Atsushi Enomoto <[email protected]>
* EventLogImpl.cs
	  EventLog.cs
	  LocalFileEventLog.cs : Implemented EntryWritten event support.
	* Win32EventLog.cs, NullEventLog.cs : they need stub overrides.
	* EventLogEntry.cs : [MonitoringDescription].
	* DiagnosticsConfigurationHandler.cs : [Obsolete]


svn path=/trunk/mcs/; revision=83277
2007-08-02 12:32:07 +00:00
Gert Driesen c86b5de942 * NullEventLog.cs: Added dummy GetLogNames implementation.
* EventLogImpl.cs: Moved GetEventLogs implementation to base class.
Added abstract GetLogNames method. Added ValidateCustomerLogName
method which should be called by eventlog providers when creating a
new log to ensure the significant part of the log name is unique, does
not match any of the special log names and does not match an exist event
source.
* Win32EventLog.cs: Validate customer log name when creating new log.
Moved GetEventLogs implementation to base class. Added GetLogNames
method.
* LocalFileEventLog.cs: Merged CreateLogStore into CreateEventSource.
Validate customer log name when creating new log. Moved GetEventLogs
implementation to base class. Added GetLogNames method.
* EventLogTest.cs: Added tests for log name validation in
CreateEventSource.

svn path=/trunk/mcs/; revision=64429
2006-08-27 09:38:11 +00:00
Gert Driesen 5ef12d3cb1 * LocalFileEventLog.cs: When event log store does not exist, then we
do not need to perform a case-insensitive lookup of the log name.

svn path=/trunk/mcs/; revision=64360
2006-08-25 15:28:22 +00:00
Gert Driesen bc28d0226b * System.dll.sources: Added Win32EventLog.cs.
* EventLogEntry.cs: Added InstanceId property (2.0 only). Moved
Obsolete attribute to correct property.
* EventSourceCreationData.cs: Updated copyright. For internal ctor,
set log name to "Application" if value is null or zero-length string.
* EventLogImpl.cs: EventImpl now acts as base class for event log
implemenations.
* NullEventLog.cs: Modified to implement new abstract methods of base
class. Removed factory class.
* EventLog.cs: EventLog implementation that delegates just about
everything to individual eventlog providers. To specify the event log
implementation to use, the MONO_EVENTLOG_TYPE environment variable can
be used. Possible values are:
- win32 : read/write entries using the native win32 eventlog
- local[:path] : read/write entries as files to a local directory
- null : silently ignore all entries
The default is "null" on unix (and versions of Windows before NT,
meaning Windows 98, ...), and "win32" on Windows NT (and higher).
When "the local" implementation is used, the directory in which to
store the event logs, event sources and entries can be specified as
part of MONO_EVENTLOG_TYPE environment variable using the syntax
"local:<path>" (eg. local:/home/myuser/mono/eventlog).
* LocalFileEventLog.cs: Event log implementation which uses a local
file store. The directory to use for persistence can be specified
as part of the MONO_EVENTLOG_TYPE environment variable (see above).
If that directory is not explicitly set, then the following directory
will be used for storing eventlog entries:
- windows       : %APPDATA%\mono\eventlog
- unix          : /var/lib/mono/eventlog
On unix, the directory permission for individual eventlog log
directories will be set to 777 (with +t bit) allowing everyone to
read and write eventlog entries while only allowing entries to be
deleted by the user(s) that created them.
Format of log files was modified to allow it contain all necessary
information for an event log entry.
* Win32EventLog.cs: Event log implementation for Windows NT and
higher which uses the Win32 native event log for reading/writing
eventlog entries, and which uses the registry to store event log and
event source registration information.
* EventLogEntryCollection.cs: Delegate implementation to event log
implementation. Use lazy init for enumerating entries. Cache current
item in 2.0 profile.
* EventLogTest.cs: Enable tests. On 2.0 profile, set MONO_EVENTLOG_TYPE
environment variable to force local file implementation to be used for
unit tests. This avoids permission issues for the unit tests, and
allows us to clean up the files/directory that are created during the
test run. Skip tests that cannot pass when the null implementation is
active (on 1.0 profile). Added tests for all WriteEntry and WriteEvent
(2.0 only) overloads, Clear, Entries, Exists and LogNameFromSourceName.

svn path=/trunk/mcs/; revision=64088
2006-08-20 11:54:06 +00:00
Atsushi Eno 59debf8c7b 2006-08-14 Atsushi Enomoto <[email protected]>
* LocalFileEventLog.cs : change lengthy environment variable name.
	  MONO_LOCAL_EVENTLOG_PATH -> MONO_EVENTLOG_PATH.


svn path=/trunk/mcs/; revision=63723
2006-08-14 14:38:21 +00:00
Atsushi Eno 00a58245be 2006-08-14 Atsushi Enomoto <[email protected]>
* System.dll.sources : added LocalFileEventLog.cs and NullEventLog.cs.

	* EventLogImpl.cs, EventLogEntryCollection.cs, EventLog.cs :
	  some rework to support actual event log implementations.
	* NullEventLog.cs, LocalFileEventLog.cs :
	  new files. The former (default) implementation does nothing for
	  any event log features. The latter implements local file based
	  event logs.


svn path=/trunk/mcs/; revision=63705
2006-08-14 06:10:01 +00:00