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

Upgrade/net.standard.2.0 #11

Merged
merged 5 commits into from Apr 13, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Remove the unused MessageObject property check

  • Loading branch information
Shweta Jain
Shweta Jain committed Apr 12, 2018
commit 5f0032d45b67cd86558672ce680c8b310b834a71
@@ -118,25 +118,6 @@ private string GetMessageAndObjectInfo(LoggingEvent loggingEvent, out object obj
message = message.Substring(0, bytesLengthAllowedToLoggly);
}
}
else if (loggingEvent.MessageObject != null)
{
if (loggingEvent.MessageObject is string
//if it is sent by using InfoFormat method then treat it as a string message
|| loggingEvent.MessageObject.GetType().FullName == "log4net.Util.SystemStringFormat"
|| loggingEvent.MessageObject.GetType().FullName.Contains("StringFormatFormattedMessage"))
{
message = loggingEvent.MessageObject.ToString();
var messageSizeInBytes = Encoding.Default.GetByteCount(message);
if (messageSizeInBytes > bytesLengthAllowedToLoggly)
{
message = message.Substring(0, bytesLengthAllowedToLoggly);
}
}
else
{
objInfo = loggingEvent.MessageObject;
}
}
else
{
//adding message as null so that the Loggly user
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.