You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
This question is almost word-for-word duplicate of your previous question, which you just deleted. Why didn't you edit it instead?amon– amon2017-11-19 21:57:47 +00:00Commented Nov 19, 2017 at 21:57
-
@amon what I've learned in all this years on SE sites... delete, rewrite, reask mostly works better then any edit.t3chb0t– t3chb0t2017-11-20 05:11:43 +00:00Commented Nov 20, 2017 at 5:11
-
I'm rather surprised that file name isn't included in your logging. Is "Event" just the function name? If not, I'd log that as well. But it looks like you're going to create an application whose primary job is to create gigabytes of logging. Anything else it does will be a handy side-effect. And don't assume that the place where the application detected an error is the place where the error actually occurred. You might be wading through vast numbers of "success" lines to find where it really went wrong.Simon B– Simon B2017-11-20 08:46:30 +00:00Commented Nov 20, 2017 at 8:46
-
@SimonB actually there is a file name, I have added it just a few hours ago and did not update the question yet... there are additional colums, CallerMemberName, CallerLineNumber and CallerFilePath that the C# compiler provides for free. The event does not necesserily have to be a method name. It can be any checkpoint like ApplicationStart. Sure, there should be a lot of Successes ;-) As one of the answers about logging said: disk-space is cheep so I'd rather log too much then spend hours debugging the application to tell someone that he's forgotten the business rules.t3chb0t– t3chb0t2017-11-20 08:51:30 +00:00Commented Nov 20, 2017 at 8:51
-
2Adding a hierarchy to logs is a reasonable thing; Log4J (and, I would expect, Log4Net) have the Nested Diagnostic Context and Mapped Diagnostic Context for just that purpose. But to make that useful, you'll probably also want a better tool for searching your logs, such as the ELK stack.kdgregory– kdgregory2017-11-20 18:53:36 +00:00Commented Nov 20, 2017 at 18:53
|
Show 2 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you