Questions tagged [log4net]

For questions specifically related to Sitecore's implementation with and use of log4net. This tag should not be used for general log4net questions that are not specific to Sitecore.

Filter by
Sorted by
Tagged with
1 vote
2 answers
421 views

How to pass custom parameters to custom log appender

I have created a custom log appender. This is from the default Sitecore.Logging.dll. public class ApiLogger : log4net.Appender.ForwardingAppender { public ApiLogger() { LogProperties = new ...
sukesh's user avatar
  • 3,033
0 votes
1 answer
116 views

Log4Net - How to get the message property of an exception

Using Sitecore 10.2 I'm trying to log only my application logs into the database. The following approach works, but for the Columns Logger & Message, I would like to change the values. Sitecore....
sukesh's user avatar
  • 3,033
0 votes
1 answer
89 views

How to use Serilog to push logs to SQL DB in XP

Using Sitecore 10.2 I have installed Serilog and Serilog.Sinks.MSSqlServer nuget packages. After the Sitecore log file is created, I would like to create logs in the database also. The debugger is not ...
sukesh's user avatar
  • 3,033
0 votes
0 answers
360 views

Sitecore custom logs not working on server

I'm trying to create a custom log for my application, but for some reason, it is not working when I deployed it into the server. Locally it is working just fine. I have already tried what's mentioned ...
Fabio Carvalho's user avatar
3 votes
1 answer
328 views

what version of log4net is Sitecore.Logging.dll branch/fork based upon?

what version of log4net is Sitecore.Logging.dll branch/fork based upon? There is a locking bug in log4net which affects version 1.2.10 https://issues.apache.org/jira/browse/LOG4NET-298 Which was ...
Ian's user avatar
  • 1,072
5 votes
1 answer
1k views

Is it possible to create a patch config file for log level?

I've created this patch file for a Sitecore 9 instance, but looking at showconfig.aspx it has had no effect. The config file name begins with a 'z' to try to ensure it's processed last. <?xml ...
R. Allinson's user avatar
1 vote
0 answers
130 views

Custom ApplicationInsights LogAppender - Log4net [closed]

I have developed a custom log appender to send exceptions to Application Insights. The problem is that some exceptions show on the AI protal (Azure) but some other exceptions don't. Anyone had similar ...
EricImhauser's user avatar
3 votes
1 answer
248 views

How to generate site specific log file in multi site scenario?

By default only one log file is created in multi-site scenario also. We have come across requirement to generate log file as per site i.e. each site have its own log file. So it'll easy to debug and ...
Abhishek Malaviya's user avatar
0 votes
0 answers
205 views

create new logs after specific interval of time

I want to create my default Sitecore logs after a specific interval of time without deleting the old ones after every 5 minutes , also whenever the limit exceeds to 10mb (default maximum file size) , ...
Rohan Bhateja's user avatar
1 vote
1 answer
974 views

Use Seq for logging with log4net instead of text file

Using Sitecore 8.2. I want to log to SEQ instead of a standard file for the Sitecore log. Since Sitecore uses log4net, I've been looking at this documentation: https://docs.getseq.net/docs/using-...
devzero's user avatar
  • 439
4 votes
2 answers
2k views

How to log service layer exceptions in Sitecore log files?

The solution is having two projects Web and Service Layer. Service Layer do not have any dependency with Sitecore. However the exceptions needs to be logged into Sitecore log files in data folder. ...
J.Joseph's user avatar
  • 109
0 votes
1 answer
348 views

Logging from Application Start Event

I have added the following code to my Application Startup, but the INFO is not showing up in my logs. Sitecore 7.5 Is this code being called at all? If not, what am I doing wrong? public class ...
ADH's user avatar
  • 1,765
1 vote
1 answer
7k views

Log4net not inserting record into database

I am using the Log4Net to insert errors into MSSQL. However, the errors are not being logged into the database. Log4net Patch File - z.Logging.config <?xml version="1.0" encoding="utf-8" ?> &...
Hishaam Namooya's user avatar
9 votes
3 answers
8k views

Change the name of the output log file

I am trying to modify the output name that is defined by appender in "Sitecore.config" <file value="$(dataFolder)/logs/log.{date}.txt"/> specifically {date} Every time I start a new instance ...
Tony's user avatar
  • 569
6 votes
2 answers
2k views

Logging Changes in Sitecore 8.1 Made by Content Authors

I would like to capture more log info from Sitecore Logging. Changes such as what exactly was edited, what text changes were added or removed. Which images were added and so on. Has anyone done ...
Tony's user avatar
  • 569
6 votes
2 answers
1k views

How can I split logs by log level/priority

I know that logs have the following levels from lowest to highest: DEBUG INFO WARN ERROR FATAL And that the <priority> of each log sets the minimum log level for messages that will be ...
Zachary Kniebel's user avatar
8 votes
3 answers
3k views

Sitecore Logging (Log4Net) Log to Database as Well as Text Files

Sitecore 7.5 The text file logging is working fine. But, I would like the logging to go to a SQL Server database so that I can search the data with T-SQL. How would I do that? I imagine it would be ...
ADH's user avatar
  • 1,765