Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Comments

Optional ConditionMethod arguments, ignoreCase argument for standard condition methods, EventLogTarget enhancements#12

Open
tg73 wants to merge 8 commits intojkowalski:masterfrom
zanyants:master
Open

Optional ConditionMethod arguments, ignoreCase argument for standard condition methods, EventLogTarget enhancements#12
tg73 wants to merge 8 commits intojkowalski:masterfrom
zanyants:master

Conversation

@tg73
Copy link

@tg73 tg73 commented Oct 6, 2011

Hi Jaroslaw,

  1. I noted that the ability to specify case sensitivity was present in the deprecated "whenEquals" (etc) conditions, but not in the newer "when" condition. So I've added support for optional (defaulted) arguments for ConditionMethod methods, and given the standard string-related ones an optional ignoreCase argument.
  2. The users of our product need to see information in the Windows EventLog, but for certain information they don't want one message per log event - they want several log events combined into one Event Log entry, otherwise they get upset. This was not possible unless we combined information within our own application, as LogEventTarget does not support batched writes. So I've modified LogEventTarget to (optionally) support batched writes (see AllowBatching property). It now derives from TargetWithLayoutHeaderAndFooter, and has an AddNewLines property similar to the MailTarget. There's also a GroupByLevel property which allows a batch write to be gouped by EventLogEntryType and written as one EventLog entry per entry type - otherwise the greatest severity within the batch of LogEvents is used.

As a general note, I couldn't find any "how to contribute" documentation, so I'm not sure how you handle contributions, notably regarding copyright. For now, I've added copyright entries in the files I've touched/created with my name, but I'm open to discussion on this.

I've built the code via build.cmd for netfx40, netfx35, netfx20 and sl3 (that's all the SDKs I've got installed) and addressed any code analysis issues. I've tested under netfx40 (including my silverlight-only code). I've also verified that the generated XSD appears to be correct for the EventLogTarget changes, and syncronized projects.

Regards,

Tom

tg73 added 8 commits October 6, 2011 11:24
- header and footer, with optional newlines
- batched writes (eg, via Buffering wrapper), with optional per-LogLevel grouping
- two overflow handling modes - truncate (what it always used to do) and split (currently a simplistic implementation)
…rameters can be omitted from the end of the parameter list (only).
…, retaining original behaviour as the default. Added new strequals function for string comparison with optional ignoreCase argument.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant