Logging using List in SharePoint 2013

There are few ways of custom logging in SharePoint 2013 –

  1. Use SPDiagnosticsService – You may write to the ULS via SPDiagnosticsService class.
  2. Utilize diagnostics.asmx web service – I have explained how to write log in Hive 15 log file in my previous blog (How to do logging in ULS from CSOM in c#?).
  3. Logging in SharePoint List – This is unconventional yet very powerful way of logging CSOM messages. Log files can be accessed directly from SharePoint site and access can be restricted.

In this blog, I will explain how to log error in SharePoint 2013 List.

Step 1 : Create Log List – First of all log list will be created in SharePoint site.

Step 2 : Create Folder In List – Folders will be created in List. The reason why folder is good way to proceed is folder will contain log entry on the basis of date.


Folder in List

Step 3 : Create Node – After that make a node in QuickLaunch so that you can access Log List directly.

I have uploaded a project that will add log in List. You will find project here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s