Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send GlobalContext.Properties and MachineName:ProcessId #1

Merged
merged 3 commits into from
Jan 14, 2017

Conversation

mantasaudickas
Copy link
Contributor

Possibility to specify (statically and dynamically) fields which should be taken from 'GlobalContext.Properties'.

Possibility to specify (statically and dynamically) fields which should be taken from 'GlobalContext.Properties'.
Copy link
Contributor

@yellowblood yellowblood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I'll approve these changes soon, and will release a new version after I'll make some changes of my own (mainly support non-string types and better threads handling).

@@ -38,14 +42,30 @@ private void WriteImpl(LoggingEvent loggingEvent)
{"thread", loggingEvent.ThreadName},
{"message", loggingEvent.RenderedMessage},
{"exception", loggingEvent.GetExceptionString()},
{"user", loggingEvent.UserName},
// log4net already adds this 'username' property which is added to values bellow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

key = key.Replace(":", "");
key = key.Replace(".", "");
key = key.Replace("log4net", "");
values["property" + key] = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the property prefix? do you think the "key" string would collide with other fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well.. collision is possible. I thought would be nice to have a clear separation of these properties. On the other hand its not really needed and can be without 'property' prefix. In some cases it is even more nice instead of 'propertyIdentity' to have 'Identity'. So I leave it for you to make final decision here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I did some major changes, including support for objects (non-string) in fields. You may grab the last revision if you want, or wait until I'll finish with the other improvements and release an official version. Thank you.

@yellowblood yellowblood merged commit 5bb3986 into logzio:master Jan 14, 2017
idohalevi added a commit that referenced this pull request Feb 24, 2019
* merge SerializeLogEvents* to one function
*change MediaTypeHeaderValue to application/json
idohalevi pushed a commit that referenced this pull request Feb 24, 2019
* add gzip Compression

* Add Compression option to ship the logs,
by default this option is on false,
need to add this option to the documentation.

* fix HttpClientHandler to work with "application/jso"

* * clean unused imports (#1)

* merge SerializeLogEvents* to one function
*change MediaTypeHeaderValue to application/json

* delete compression in sanity test (#2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants