Hot answers tagged

5

That is normally the line continuation character and is used whenever a particular message is too long to be included on a single line. I can't say I've ever seen it used quite like is in the picture though. According to this, it means : A trace log message can have multiple "middle" sections. Trace log messages are not guaranteed to appear ...


4

One quick way would be to have the C# program call PowerShell cmdlets to read the ULS log files and then use the results to display on a custom web page. The SharePoint PowerShell cmdlets (e.g., Get-SPLogEvent & Get-SPLogLevel) would provide the 'filtering' as needed - Executing PowerShell scripts from C# How to run PowerShell scripts from C# Using ...


4

You can use SPContext within a "RunWithElevatedPrivileges" block, but objects you get from "SPContext" such as: SPUser, SPWeb, etc. are not running in elevated privilege, they just take the current user security context. So why not just use "scweb" to get to the "Group". Since "scweb" object is initialized within the "RunWithElevatedPrivileges" block just ...


3

You can order up your approaches as below, ULS Event Viewer Text file. I suggest, ULS - Its the SharePoint native logging and it manages to remove the older files periodically, its better to keep all the SharePoint related logs in one place "ULS". Use SPDiagnosticsService.Local.WriteTrace method in your timer job to log into the ULS logs If you find that ...


3

Few points to check: In web.config add <system.diagnostics> <trace> <listeners> <add name="WebPageTraceListener" type="System.Web.WebPageTraceListener, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> &...


2

If you have Site Collection Audit Logging enabled (Site Actions -> Site Settings -> Configure audit log settings,) which hopefully you do, you can view the Audit reports for the site. It will show the group deletion under "Security Settings" Since you are using SharePoint foundation you might want to check it through this way, Another option would ...


2

i write to event viewer like so: create an class project, using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; using System.Diagnostics; namespace EventViewerErrors { public class reportError { public reportError() { } public static void WriteError(...


2

In my case. I installed June 2013 CU about a week ago. Today I had a need to go to log and notice it has not been generating since the day I applied CU. I went to each SharePoint server and noticed "SharePoint Tracing Service" logon changed to domain account. It should be "Local Service". I changed the login to Local Service and restarted "SharePoint 2010 ...


2

Wouldn't it make more sense to use the built in auditing features for this? The auditing information can be stored in a separate database (which is actually supported if you access) that will give you the ability to run scripts against it. You could set up some daily processing scripts to parse out the data and update your metrics.


2

You can use the REST/JSOM API to log your own usage to show up in SharePoint usage analytics. For example the REST endpoint looks like this: "/_api/Microsoft.SharePoint.Administration.SPAnalyticsUsageService/logevent" You can look at the full code example on doing this from JavaScript here: http://sharepointfieldnotes.blogspot.com/2013/11/more-sharepoint-...


2

You should instead run: Clear-SPLogLevel This will re-set all categories to Medium. That said, there are instances where higher level verbosity is logged, but not in the manner your screenshot shows.


2

You can store them in a custom list.


2

You would use Get-SPLogLevel -Identity <value>, e.g. Get-SPLogLevel -Identity Database to show the current level for the Database category. You can also exclude the Identity parameter to get all categories.


2

Couple of options: change the path of Log files from system drive(from c drive) to non system. Now even this drive full but still sharepoint and os will work. if you enable the verbose logging, please turn it off and switch back to "reset to default" from central admin > Configure Diagnostic logging. You can also restrict the number of logs files as well as ...


2

There are two settings to limit the amount of logs: Number of days Size in GB I am not a fan of keeping ULS-Logs forever if company-policy doesn't force me to do so. Most troubleshooting is done via ULS realtime-Log. I need the old logs only if i get a Correlation-ID from a user. Normally i try to keep 30 days. So i adjust the "size in GB" on how much logs ...


2

Add the following to the system.web section of your web.config file: <trace enabled="true" localOnly="false" requestLimit="100" /> Or enable it as below via code: public static void EnableTracing() { Configuration configuration = WebConfigurationManager.OpenWebConfiguration("~"); TraceSection section = (TraceSection)...


2

Symptom: Capture usage logging in a single server SharePoint 2016 in order to know which pages are being accessed and by which user Microsoft SharePoint Foundation Usage Data Import job doesn't run Imports usage log files into the event store. Cause: SPUsageService Provisioning issue We found that there was a mismatch in the ID of the timer job ...


2

The SharePoint log preserve some information related to Unauthorized Access Tries that saved in the log file as "Sending HTTP response 401 - text/plain:401 UNAUTHORIZED" But, Unfortunately, the UserIdentityName is not preserved, it showed as null. The entry log for Unauthorized Access looks like: 07/12/2017 12:03:23.34 w3wp.exe (0x464C) 0x2398 ...


1

I just tried in my farm the below steps and its worked as expcted. Set-SPLogLevel -TraceSeverity None Set-SPLogLevel -EventSeverity None Now all categories showing the none. and i checked the ULS logs, nothing after that. Another way to stop it, their is one Timer services which is responsible for this called sharepoint tracing services, try to stop on ...


1

Check if your auditing is enabled. Navigate to Site Settings → Site Collection Administration → Site collection features → Choose “Reporting” → See if it is activated else Press “Activate”. Navigate to Site Settings → Site Collection Administration → Site collection audit settings → Check if “Deleting or restoring items” is checked else check it → Click “OK”...


1

basically this is how it works. SharePoint writes the Usage data into Usage Logs. SharePoint Timer(Microsoft SharePoint Foundation Usage Data Processing,) Job move that data into Usage Database for later use. Once the data in the database then you can run the run/view reports in SharePoint. This is the data about usage on SharePoint Farm, like Page ...


1

I figured out that there properties are disabled by design (really? lol). The values in the MachineIP column and in the MachineName column appear as NULL because of privacy concerns. By design, Windows SharePoint Services 3.0 works in this manner. I think is it possible to trace these information looking into IIS Logs. Auditing for a site collection in ...


1

Their are two ways to check this. You can Use the powershell commands [Get-SPLogLevel][1]. This example displays throttle levels for all categories. You can go to Central admin Site of farm. Central Admin> Monitoring > Configure Diagnostic logging. On this page you can expand all the categories and check th level of Log.


1

SharePoint automatically creates a new ULS log file every 30 minutes to limit the size of each file. One of the first configurations made in a new production server farm is to move these files to another hard drive on each server within the farm. The C-drive is critical to running the OS. The ULS can and should be configured to prevent unnecessary data ...


1

You can use powershell: Set-SPDiagnosticConfig -LogDiskSpaceUsageGB 500 link to Microsoft technet article http://technet.microsoft.com/en-us/library/ee748656(v=office.15).aspx


1

Usage Events - Every time that a user views an item, the system issues a usage event.In SharePoint 2013 three usage events are defined out of the box . These default events are always registered and analyzed by SharePoint. Following are the default usage events Views – number of views for a single item, page, or document. Recommendations Displayed – ...


1

In this case, the reason the logs were so empty was because only one of my SharePoint system accounts had permissions to write to them! To fix this, I added the various system accounts for the Farm, Search and Crawl services, App Pools etc. to the [domain]/Builtin/Performance Log Users group in Active Directory and restarted the server.


1

This error is actually a unauthorised from within the managed code of the owssvr.dll. This coming up with 404 because the server is making receiving the request on it's wcf service. Browse to the address given on the local address part: http://[webapp]/[guid]/ProfileDBCacheService.svc Then confirm access to this web service. It is the proxy service for ...


1

I used SharePoint Diagnostic logging for may of my projects.You can create your own Custom Areas and categories by inheriting from SPDiagnosticsServiceBase class. I have created a class which helps in logging to both ULS and Event Viewer. http://sharepointnadeem.blogspot.in/2011/10/sharepoint-2010-diagnostic-logging.html


1

I have used and recommend Application Foundation for SharePoint 2010 and it has worked really well for me. It has a component called SharePoint Logger which takes care of logging to ULS for you. http://msdn.microsoft.com/en-us/library/ff798395.aspx It takes a little while to get started with it but its worth the time.


Only top voted, non community-wiki answers of a minimum length are eligible