we are using remote(gelf) loggers.. here is config. snapshot of file
logger and gelf logger
/// <summary>
/// Used to configure both local(file) and remote(gelf) loggers.
Primary log configuration.
/// </summary>
public void ConfigureFileAndGelfLoggers()
{
GelfLayout gelfLayout = new GelfLayout
{
ConversionPattern = "%m",
AdditionalFields = "App:" + _cloudSettings.AppName +
",IPAddress:" + _cloudSettings.LocalIpAddress + ",SessionID:" +
_cloudSettings.SessionId +
",Level:%p,Stacktrace:%stacktrace{8}",
LogStackTraceFromMessage = true,
IncludeLocationInformation = false
};
gelfLayout.ActivateOptions();
GelfUdpAppender udpAppender = new GelfUdpAppender
{
Layout = gelfLayout,
RemoteHostName = _cloudSettings.LoggingRemoteHostname,
RemotePort = _cloudSettings.LoggingRemotePort
};
udpAppender.ActivateOptions();
RollingFileAppender fileAppender = new RollingFileAppender
{
AppendToFile = true,
RollingStyle = RollingFileAppender.RollingMode.Composite,
MaximumFileSize = "100MB",
MaxSizeRollBackups = 30,
File = _filepath,
Layout = GetFileLayout()
};
fileAppender.ActivateOptions();
Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
hierarchy.Root.AddAppender(udpAppender);
hierarchy.Root.AddAppender(fileAppender);
hierarchy.Root.Level = _logLevel;
hierarchy.Configured = true;
}
On Tuesday, December 13, 2016 at 3:15:37 AM UTC-5, Jochen Schalanda wrote:
>
> Hi Jitesh,
>
> On Monday, 12 December 2016 22:20:10 UTC+1, Jitesh Bhate wrote:
>>
>> in service fabrics logs are getting logged into file.
>> but they are not getting over to graylog server.
>>
>
> How are you reading these files and send their contents to Graylog?
>
> Cheers,
> Jochen
>
--
You received this message because you are subscribed to the Google Groups
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/graylog2/a5dc0d4c-08c2-4f68-a234-5e1c9f69d0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.