Umbraco provide easy way to log exception in there Log table with additional information.
Namespace : using umbraco.BusinessLogic; and using umbraco.NodeFactory;
Method: Log.Add(LogTypes.Type of Log, int nodeId, string error message)
LogTypes : Type of error you want to store. Actually It means under which category you want to file your error or comment.
General LogType: Copy , Custom , Debug , Error, Login and many more.
Node Id: Id of node for which you are loging the error or comment in Log table.
Comment: String text you want to store.
Log.Add(LogTypes.Debug, Node.GetCurrent().Id, string.Format(“It seems that you have not setup your mail server”));
Another Umbraco Article
- Umbraco: How to Format Date in Umbraco or in .net by c#.
- Umbraco: XML Serialization of custom data value in umbraco.
- Umbraco: How to get current site name in Umbraco by c#.
- Umbraco: Get Dictionary Item In umbraco by c#.
- Umbraco: Execute Some Logic after Document Save in Umbraco CMS by c#.
- Umbraco: Execute Code after Document Publish in umbraco CMS by c#.
- Umbraco: How to validate Email address in umbraco by c#.
- Umbraco: How to Log or store error in umbraco Log Table by c#.
- Umbraco: How to get and Set Document Property value in by c#.
- Umbraco: Create Custom Content node In Umbraco by c#.
- Umbraco: Register Event Handler In umbraco
- Umbraco: Create your first Rss Feed Burner in umbraco
- Umbraco: Execute Sql query in umbraco during package installation
- Umbraco: Useful Resources for Umbraco CMS development
- Umbraco: How to Create Custom data type in umbraco using c#.
- Umbraco: How to get nodeID by node name by programatically in c#.
- Umbraco: Cheat sheet for umbraco development for Newbie
Page Keyword: Exception Handling in umbraco, Exception in Log table in umbraco, Log table in umbraco, Use of Log table in umbraco, Store error in lag table by c# in umbraco, store or handle exception in umbraco.